您的位置:首页 > 移动开发 > Android开发

Please ensure that adb is correctly located at '\sdk\platform-tools\adb.exe' and can be

2016-06-29 16:02 801 查看


遇到问题描述:

    运行Android程序控制台输出
    [2016-06-18 16:18:26 - ] The connection to adb is down, and a severe error has occured.

    [2016-06-18 16:18:26 - ] You must restart adb and Eclipse.

    [2016-06-18 16:18:26 - ] Please ensure that adb is correctly located at 'D:\Java\sdk\platform-tools\adb.exe'
and can be          executed.

解决问题:

  1)百度google思路:1.原因adb.exe没有执行。找到adb.exe存放的地方(一般出现这个错误的时候,现在会提示adb.exe的路径),双击adb.exe让他运行就行了。2.adb.exe已经执行。重启:使用命令行。开始---运行---输入cmd,使用cmd命令行,然后在命令行中进入adb.exe所存放的路径,然后输入adb   kill-server,点击Enter键,然后再输入adb  start-server,点击Enter键,如果下面提示daemon
 started  successfully,则表示adb.exe已经运行了,现在可以使用android 模拟器来运行你的程序了;
  2)但我任务管理器就没有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,发现是adb.如下所示

tasklist|findstr "6540"
adb.exe          6540 Console                    1      4,276 K

  接下来问题就好解决了,在任务管理器kill掉adb.exe ,运行android程序,ok .
3)如果还没有解决问题,那么重启计算机。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android android开发