Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch error: Failed to connect to remote VM [duplicate]

Possible Duplicate:
Eclipse Error: “Failed to connect to remote VM”

I am using Eclipse to dip my toe into Android development. All going well but recently, I am not able to use debug anymore. When I click 'Debug As' - 'Android Application', app builds ok, installs ok but Android device (either actual device or emulator, it makes no difference) waits with 'Waiting For Debugger' with a single 'Force Close' button. In the console, I get something like:-

[2011-08-26 11:59:59 - Sunrise] Starting activity com.sr.sunrise.Sunrise on device 3833CB14F52C00EC [2011-08-26 11:59:59 - Sunrise] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.sr.sunrise/.Sunrise } [2011-08-26 12:00:00 - Sunrise] Attempting to connect debugger to 'com.sr.sunrise' on port 8614 [2011-08-26 12:00:00 - Sunrise] Launch error: Failed to connect to remote VM

I have followed many searches (including this one StackOverflow.com link and this StackOverflow.com link2

and I have tried many suggestions but nothing has fixed this problem yet.

Can anyone help me as this is now stopping me from creating my masterpiece ;-)

like image 765
Paul Goodwin Avatar asked Aug 26 '11 11:08

Paul Goodwin


2 Answers

This just worked for me:

  1. Close Eclipse.
  2. Remove USB.
  3. Go to task manager, and delete all 'eclipse.exe' (in my case I had 4-5 instances).
  4. Also delete 'adb.exe'.
  5. Restart Eclipse.
  6. Reconnect USB.

Maybe this will work for others who have the same problem.

like image 67
gosr Avatar answered Nov 03 '22 00:11

gosr


THIS IS PRETTY MUCH THE NUCLEAR OPTION...

I had the same problem on my macbookpro, I don't know exactly how to fix it data loss, but on my system, I "rm -r ~/.android", recreated my devices, and I can again debug.

It is important to note that this is destructive in that the .android directory is where the android emulator is saving the state of the devices I am emulating.

I think the root cause of the problem had something to do with an old android SDK that I removed from my system when I downloaded the android-sdk_r15-macosx.zip leaving some cruft around in the .android directory.

like image 25
Bob Kuhar Avatar answered Nov 02 '22 23:11

Bob Kuhar