Eclipse issue - Startup error: Failed to connect to the remote virtual machine. Connection timed out

I get a message

Startup Error: Failed to connect to the remote virtual machine. Connection timeout.

every time I debug my application on a reader. I added in AndroidManifest:

<uses-permission android:name="android.permission.SET_DEBUG_APP"/> 

and

 android:debuggable="true" 

But still this does not help. When I reset Eclipse (close it and open it again), this problem is sometimes resolved. Its really hard to work that way. How can I solve this problem?

+6
source share
9 answers

I sometimes have this problem after disconnecting the phone from the computer and reconnecting.

I do CTRL + ALT + DELETE and kill all adb.exe processes and it fixes this for me.

Try it if this also works for you.

Note: I find this faster than restarting adb from the / eclipse command line

+11
source

Just this error, tried a few things, finally changed the port. I was in port 8600, changed to 8601 and connects instantly! This parameter can be found in Windows-> Preferences-> Android-> DDMS. Change the default port, apply and restart Eclipse.

+7
source

Just uninstall the application from the device and run debug again.

+4
source

I don’t know why, but it works for me: first run (or debug) your application in the emulator, and then debug the application on the device (without closing the emulator).

I know this is not a good solution, but it is easy.

+3
source

Another thing:

In my case, I had 2 instances of running eclipse

To solve:

  • Close eclipse
  • Use the task manager to kill any additional eclipse processes that are running
  • Restart eclipse
+3
source

When running my app as an Android app on Galaxy SII, everything worked fine. When debugging the same application, I got an error:

Startup Error: Failed to connect to the remote virtual machine. Connection timeout.

JRE 1.7 was installed on my Windows XP. After completely uninstalling Java 1.7 and installing JDK 1.6u26, I was able to debug my application.

+2
source

In Eclipse ... Window β†’ Settings β†’ General β†’ Network Connections, select "Native" as the Activator.

I had this problem and I went crazy. Now I have decided.

+2
source

I had AVG 2013 on my system, I uninstalled it, and everything is working fine. I assume that AVG does not allow the emulator to open a port for the debugger.

+1
source

Yes, I have had this problem a lot in the last few weeks. StackOverflow lacks the proposed solutions, but most of them involve rebooting or killing.

I noticed that the error message included the phrase "Connection timeout". Therefore, I was hoping that there are some settings to extend this time, and therefore the attachment will not be disabled.

There is! What worked for me was to increase the wait time.

I'm on Eclipse Kepler now (Build id: 3.0.3-20140327-1716-Typesafe)

In the Windows menu β†’ Skills β†’ Java β†’ Debugging

At the bottom of the window you will see the following field: Debug timeout (ms): 3000

I added another zero, 30,000, and my problems were gone.

You may find that your breakpoints are still skipped initially, but wait! With this long timeout time, just keep walking past these breakpoints until the debugger is successfully attached and boom! You stop at control points.

Even better, run your application in "debugging" mode, fold your arms, wait 30 seconds or more ... then on it!

This led to this revelation as follows:

Getting Startup Error: Failed to connect to the remote virtual machine. Connection timed out. which is trying to debug my application on my android device

0
source

Source: https://habr.com/ru/post/903835/


All Articles