First, the situation description:
We are using eclipse development sometimes there is an ADB connection exception, sometimes the console will print out the ADB connect exception
For example, the following will appear:
[2014-12-18 16:18:26- ] The connection to ADB was down, and a severe error had occured. [2014-12-18 16:18:26- ] You must restart ADB and Eclipse. [2014-12-18 16:18:26-] Please ensure the ADB is correctly located at ' E:\ADT-BUNDLE-WINDOWS-X86_64-20140624\SDK\PL Atform-tools\adb.exe ' and can be executed.
Ii. Solutions
Most of these are caused by other programs that take up 5037 of ports, and the idea is to see which program is consuming the ADB debug port and then end it.
Use the following command:
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
We can see that a program called Kadb.exe is taking over our ADB port and going into the task manager and finding it is over.
1. Close Kadb.exe
2.ADB Kill-server
3.ADB Start-server
4. Restart Eclipse
Solution to ADB connection exception in ADB startup failure in Android development