在測試程序的時候,我遇到提示:
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