`

Android Please ensure that adb is correctly located at问题解决

 
阅读更多

转:http://hi.baidu.com/lanmosonny240/item/4d405a82ade7ce9a4414cf98

 

遇到问题描述:

运行android程序控制台输出

    [2012-07-18 16:18:26 - ] The connection to adb is down, and a severe error has occured.
    [2012-07-18 16:18:26 - ] You must restart adb and Eclipse.
    [2012-07-18 16:18:26 - ] Please ensure that adb is correctly located at 'D:\adt-bundle-windows-x86_64-20130219\sdk\platform-tools\adb.exe' and can be executed.

 

adb概述(百度百科)

adb的全称为Android Debug Bridge,就是起到调试桥的作用。通过adb我们可以在Eclipse中方便通过DDMS来调试Android程序,说白了就是debug工具。adb的工作方式比较特殊,采用监听Socket TCP 5554等端口的方式让IDE和Qemu通讯,默认情况下adb会daemon相关的网络端口,所以当我们运行Eclipse时adb进程就会自动运行。
adb是android sdk里的一个工具, 用这个工具可以直接操作管理android模拟器或者真实的andriod设备(如G1手机).  它的主要功能有:
* 运行设备的shell(命令行)
* 管理模拟器或设备的端口映射
* 计算机和设备之间上传/下载文件
* 将本地apk软件安装至模拟器或android设备
ADB是一个 客户端-服务器端 程序, 其中客户端是你用来操作的电脑, 服务器端是android设备.

当你启动一个adb客户端,客户端首先确认是否已有一个adb服务进程在运行。如果没有,则启动服务进程。当服务器运行, adb服务器就会绑定本地的TCP端口5037并监听adb客户端发来的命令,—所有的adb客户端都是用端口 5037与adb服务器对话的.

 

1.  解决问题:

百度google大家多说的是任务管理器 kill掉adb 或者重启adb server,但我任务管理器就没有adb ,猜测是某个程序占用了adb端口。于是按此思路查找。

5037为adb默认端口 查看该端口情况如下:

       netstat -aon|findstr "5037"

      TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       6540

发现6540占用了 5037端口,继续查看6540的task,发现是wandoujia  .如下所示

        tasklist|findstr "6540"

        wandoujia_daemon.exe          6540 Console                    1      4,276 K

接下来问题就好解决了,在任务管理器kill掉wandoujia_daemon.exe  .

2.  将D:\adt-bundle-windows-x86_64-20130219\sdk\platform-tools都加到环境变量中去。
(classpath或者path)

3.重启eclipse,运行android项目,可以了。

 

关于adb

附:http://www.cnblogs.com/playing/archive/2010/09/19/1830799.html

http://blog.csdn.net/winsunxu/article/details/7042972

 

分享到:
评论

相关推荐

    运行android时,出现“Please ensure that adb is correctly located

    运行写好的应用程序时,出现“Please ensure that adb is correctly located at 'E:/src/android23sdk/Android-sdk_r08-windows/android-sdk-windows/platform-tools' and can be executed.”提示。

    【JAVA】Please ensure that adb is correctly located at 解决详细方案

    【JAVA】Please ensure that adb is correctly located at 解决详细方案

    Please ensure that adb is correctly located..... 问题

    NULL 博文链接:https://huangqinqin.iteye.com/blog/1848006

    adb 端口被占用详细解决方法

    如果出现以下问题则有可能是被占用了端口号 The connection to adb is ...Please ensure that adb is correctly located at 'D:\Program Files\Android\android-sdk\platform-tools\adb.exe' and can be executed.

    adbKill_zip

    eclipse 打开android错误 - kingsollyu的专栏 - 博客频道 - CSDN.NET ...Please ensure that adb is correctly located at 'D:\android\android-sdk-windows\platform-tools\adb.exe' and can be executed.

    Android adb 出错解决方法

    1.遇到问题描述:   运行android程序控制台输出 [2012-07-18 16:18:26 - ] The connection to adb is... [2012-07-18 16:18:26 - ] Please ensure that adb is correctly located at 'D:\java\sdk\platform-tools\

    Android在启动adb时失败解决方案

    因为我更新了最新的adt出现ADB server didn’t ACK, failed to start daemon 然后你想启动一个程序这个时候又会出现 Please ensure that adb is correctly located at ‘E:\android-sdk-windows\platform-tools\adb....

    android eclipse 运行项目报错解决

    and a severe error has occured.[2014-01-14 21:42:11 - myBluetooth] You must restart adb and Eclipse.[2014-01-14 21:42:11 - myBluetooth] Please ensure that adb is correctly located at 'D:\Android\adt-...

    hprof-conv.exe

    [2016-07-10 17:09:11 - QtActivity] Please ensure that adb is correctly located at 'D:\Android\sdk\platform-tools\adb.exe' and can be executed. 使用如下方法: 1.关掉豌豆夹之类的软件. 2.运行命令行adb...

    android开发环境遇到adt无法启动的问题分析及解决方法

    开始研究android开发,搭建开发环境的时候就出了问题……果然是好事多磨~ 安装了jdk,配置环境变量,安装了完整版的adt、创建了helloworld程序,启动的时候就报错 “Please ensure that adb is correctly located at...

    Android adb.exe程序启动不起来 具体解决方法

    经常遇到 Please ensure that adb is correctly located at ‘D:\java\sdk\platform-tools\adb.exe’ and can be executed. 遇到问题描述: 运行android程序控制台输出  [2012-07-18 16:18:26 – ] The connection ...

Global site tag (gtag.js) - Google Analytics