The connection to adb is down, and a severe error has occured
编程的时候
运行android程序控制台输出
[2014-4-05 16:18:26 - ] The connection to adb is down, and a severe error has occured.[2014-4-05 16:18:26 - ] You must restart adb and Eclipse.[2013-4-05 16:18:26 - ] Please ensure that adb is correctly located at 'D:\java\sdk\platform-tools\adb.exe' and can be executed.
-
任务管理器 kill掉adb 或者重启adb server,如果任务管理器就没有adb ,应该是某个程序占用了adb端口。
5037为adb默认端口 查看该端口情况如下:
netstat -aon|findstr "5037"
TCP 127.0.0.1:5037 0.0.0.0:0 SYN_SENT 3772
发现3772占用了 5037端口,继续查看3772的task,发现是wandoujia .如下所示
tasklist|findstr "3772"
wandoujia_daemon.exe 3772 Console 1 38,636 K
接下来问题就好解决了,在任务管理器关闭到掉wandoujia_daemon.exe ,运行android程序,ok
-
将android-sdk-windows/platform-tools和android-sdk-windows/tools都加到环境变量中去。(classpath或者path)