ADB server didn't ACK * failed to start daemon *解决方法

发布于 2016-07-09  7.01k 次阅读


装完Eclipse和Genymotion模拟器以后,运行的时候经常会出现adb错误,表现为:

he connection to adb is down, and a severe error has occured.   
You must restart adb and Eclipse.   
Please ensure that adb is correctly located at 'D:\android\sdk\platform-tools\adb.exe' and can be executed.

然后重启电脑重启Eclipse,问题仍然出现,并且有时候会变成:

ADB server didn't ACK
* failed to start daemon *

我去网上搜了一下,有可能端口占用的问题。adb的端口是5037,如果别的程序已经占用了5037端口那么它就没法启动了。
打开命令提示符,输入

netstat -aon|findstr "5037"

就能看到所有占用了5037端口的程序的PID。
根据PID我们可以用

tasklist|findstr "2748"

查看该PID对应的进程名。
我在这里看到都是adb.exe。那么这个adb.exe是谁的呢?我打开任务管理器,右击adb.exe选择打开文件夹。原来不是eclipse的sdk的adb,是genymotion自带的sdk。
接下来我打开Genymotion,在设置里把sdk的路径改成了D:\android\sdk与Eclipse一致,然后重启果然就好了。。