在eclipse中运行Android应用报错:
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 'D:/android-sdk-windows/tools/adb.exe' and can be executed。
该类问题一般是在运行adb时端口已经被另外的进程给占用了。
根据提示:可以在命令行中输入:
adb reboot 来重启adb,此时命令行会提示:
adb默认端口是5037,在命令行下输入:netstat -ano|findstr "5037"(-a显示网络连接状态,-n是以ip地址形式显示,-o列出进程pid) 查看5037这个端口被哪个进程占用。
被pid为1592的进程侦听。
用tasklist |findstr "1592"命令显示出对应该pid的应用名。
image name)
重新启动用adb reboot启动adb。
这时可以启动eclipse运行Android应用了。