在测试程序的时候,我遇到提示:
The connection to adb is down, and a severe error has occured.
HelloWorld] You must restart adb and Eclipse.
HelloWorld] Please ensure that adb is correctly located at 'E:\android\android-sdks\platform-tools\adb.exe' and can be executed.
查看任务管理器没有adb,估计是某个程序占用了adb端口。
5037为adb默认端口 查看该端口状况以下:
cmd查看
netstat -aon|findstr "5037"
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 5244
TCP 127.0.0.1:5037 127.0.0.1:57828 TIME_WAIT 0
发现5244占用了5037端口,继续查看5244的task:
tasklist|findstr "5244"
360MobileLink.exe 5244 Console 1 10,592 K
发现是360MobileLink.exe占用,直接在任务管理器里面kill掉或卸载。
肯定端口没有占用时,从新开启adb:
adb kill-server
adb start-server android