今天安装安卓的开发环境,写了一个helloworld,运行时发现出现错误:
The 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 ‘<–此处显示adb.exe的全路径–>’ and can be executed.
百度一下,发现是adb的端口被占用了
cmd netstat -ano|findstr “5037” #5037是adb的默认端口
返回:TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 10646
再tasklist 发现10646是kadb.exe
对就是这货占用了端口,百度发现它是属于酷狗音乐,taskkill它
再运行又出现了错误(没记下来)
cd 到adb的路径(XX\adt-bundle-windows-x86-20130917\sdk\platform-tools)
adb.exe kill-server
然后
adb.exe start-server
显示success
重启eclipse
问题解决。