运行android程序控制台输出异常The connection to adb is down, and a severe error has occured

来源:互联网 发布:剑网三军爷脸数据 编辑:程序博客网 时间:2024/05/19 23:14
   在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 'E:\SDK\platform-tools\adb.exe' and can be executed.

这种有很多情况,也有比较多的解决方法:
1、任务管理器 kill掉adb 或者重启adb server

2、查看任务管理器没有adb,猜测是某个程序占用了adb端口
5037为adb默认端口 查看该端口情况如下:
查看:cmd —— netstat -ano|findstr "5037"

TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 5408
TCP 127.0.0.1:5037 127.0.0.1:49542 ESTABLISHED 5408

发现5408占用了 5037端口
直接在任务管理器里面kill掉

1)、tasklist 可以找到任务管理器所有进程
2)、taskkilll /f /im 程序名1.exe /f /im 程序名2.exe .... 可以kill掉多个程序

3、重新开启adb
adb kill-server
adb start-server
4、终极解决办法--------
手机关机重启,如果还是不行,那直接一点,关闭AS或者Eclipse,重启电脑


0 0
原创粉丝点击