4

I know this issue has been posted many times previously and I have scoured almost all suggested solutions, however I'm continuing to encounter issues when trying to debug my Android application on my Android phone through Eclipse. Running in release mode works fine on the device, however I keep encountering the following error when trying to debug:

can't bind to local 8700 for debugger

Launch error: Failed to connect to remote VM. Connection timed out.

I've tried changing the DDMS ports (e.g. 8600, 8601, 8602, 8610, 8700, etc.), and between each change I close Eclipse, end adb.exe, disconnect my phone, then restart Eclipse. I've extended the timeout to be 15000. I've selected "USE ADBHOST". I've disabled my AVG and firewall. I've uninstalled AVG off my phone. I've rebooted my machine twice. I've even tried looking at the Windows Host file (C:\Windows\System32\Hosts) and checking that the local host is set to 127.0.0.1. Nothing seems to work.

What's strange though is that almost every 20th time, it will successfully connect and begin debugging (and I can step through the application line by line). However if I finish debugging and then try debug again without changing anything, it will produce the above error.

My computer is running Windows 8 64-bit however I can't think that it would be a Windows 8 bug causing this issue. Also my Android phone is a Samsung Galaxy S3 (don't think this would be the cause of any issues either).

Help Please! :)

3 Answers 3

5

This just worked for me:

  • Close Eclipse.
  • Remove USB.
    • Go to task manager, and delete all 'eclipse.exe' (in my case I had 4-5 instances).
    • Also delete 'adb.exe'.
    • Restart Eclipse.
    • Reconnect USB.
Sign up to request clarification or add additional context in comments.

1 Comment

Tried this multiple times, only have one instance of Eclipse open and when I close the window there's no instances of Eclipse remaining in the task manager. I followed those exact steps multiple times as I read that recommendation on a different post. Still no luck :S
1

I am having the same problem it is due to me installing AVG Antivirus, You can remove it and the debugger should work fine.

1 Comment

I do have AVG installed so that might be it, but I'm not sure if I want to uninstall it for testing purposes though and I'm now using Android Studio which is working a treat. Thanks for the answer though, if someone else on these forums can verify it works I'm more than happy to give it as a correct answer.
0

The problem is definately AVG.. I recently upgraded to a new version and it breaks the debugging.. as soon as you uninstall AVG it works..

Tried turning off EVERYTHING in AVG and disabling for 20 mins but it still broke it..

1 Comment

For me this was actually Avast... They added a Home Network shield, disabling it made my problems go away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.