一、遇到问题 [2016-11-22 11:17:35 - ] The connection to adb is down, and a severe error has occured. [2016-11-22 11:17:35 - ] You must restart adb and Eclipse. [2016-11-22 11:17:35 - ] Please ensure that adb is correctly located at 'D:\adt-bundle-windows-x86_64-20130917\sdk\platform-tools\adb.exe' and can be executed.二、解决办法
来自http://staratsky.iteye.com/blog/2162127。但是对于我的问题无效。
这些大多数是其它程序占用了5037端口导致的,解决问题的思路就是查看是哪个程序占用了adb调试端口,然后结束掉它就行。
使用命令如下:
netstat -aon|findstr "5037"
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 18212
tasklist|findstr "18212"
kadb.exe 18212 Console 1 1,260 K
大家能够看到是一个叫着kadb.exe的程序在占用我们的adb端口,进入到任务管理器里面,找到它结束掉就行了(这里我找到的就是adb.exe)。
1.关闭kadb.exe
2.adb kill-server
3.adb start-server
4.重启Eclipse
三、我的问题
EClipse中配置的SDK和Genymotion中配置的ADB不同(Genymotion使用的是AS的SDK)。修改Genymotion中ADB的路径。然后再进行调试