原来运行好好的环境,今天一直run不起来,一直提示如下错误:
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
查看了一些资料,出现该问题可能主要是下面两个原因:
1、adb.exe进行进程已经起来了,在任务管理器中看一下是否已经存在,如果已经存在,关掉该进程,重启一下eclipse。
2、adb默认使用的端口5037被暂用,导致起不来。通过下面方法可以确定是否被占用。
C:\Users\Administrator>netstat -aon|findstr "5037" ----查看哪个进程占用了改端口,我这里是13168进程
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 13168
C:\Users\Administrator> tasklist|findstr "13168" --------通过进程ID找到对应的进程名称
kadb.exe 13168 Console 1 6,648 K
在管理器中结束该进程,重启eclipse就正常了!