Solution to the error "Can't bind to local 8602 for debugger" on Android
In order to adapt to the development of Android 5.0, JDK was upgraded to 1.7, and then in ADT I wanted to debug the program (the real machine I connected to), and the result was an error as follows:
[2015-04-23 15:31:37 - ddms] Can't bind to local 8602 for debugger [2015-04-23 15:31:37 - ddmlib] The software in your host aborted an established connection 。 : The software in your host aborted an established connection。 at .write0(Native Method) at (Unknown Source) at (Unknown Source) at (Unknown Source) at (Unknown Source) at (:213) at (:642) at (:348) at (:488) at (:835) at (:803) at (:763) at (:652) at $100 (:44) at $ (:580)
According to the error message, it should be that the debug port was occupied. I thought it was caused by upgrading 1.7. Some people on * said that it would be just removed 1.7 and reinstall 1.6. Think about it, it shouldn't be. Android 5.0 requires that JDK must be upgraded to 1.7. Suddenly I found that I was still running Android Studio at the same time, and I also connected to my phone. I caught the culprit. This must be the guy! Turn off Android Studio decisively, then clean the project in ADT, and re-run the program. If you encounter the above situation, it may not be that Android Studio occupies the debug port, or there are other processes occupies it. Please do not suspect that it is a problem with JDK1.7.
Thank you for reading, I hope it can help you. Thank you for your support for this site!