I know that this problem has been published many times before, and I looked through almost all of the suggested solutions, however, I continue to encounter problems when trying to debug my Android application on my Android phone through Eclipse. Starting in release mode works fine on the device, however, when trying to debug, I always encounter the following error:
cannot communicate with local 8700 for debugger
Startup Error: Failed to connect to the remote virtual machine. Connection timeout.
I tried changing the DDMS ports (e.g. 8600, 8601, 8602, 8610, 8700, etc.) and between each change I close Eclipse, end adb.exe, turn off my phone, and then restart Eclipse. I increased the wait time to 15000. I selected "USE ADBHOST". I disabled AVG and firewall. I deleted AVG from the phone. I rebooted my car twice. I even tried to look at the Windows Host file (C: \ Windows \ System32 \ Hosts) and check that the local host is set to 127.0.0.1. Nothing seems to work.
Which is strange, but almost every 20th time, it will successfully connect and start debugging (and I can use the application step by step). However, if I finish debugging and then try to debug without changing anything, this will cause the above error.
My computer is running Windows 8 64-bit, but I cannot think that it will be a Windows 8 error causing this problem. Also my Android phone is the Samsung Galaxy S3 (don't think that this would be the cause of any problems).
Help me please!:)
source share