Eclipse gets stuck when trying to launch Android app

AndroidEclipseDelegates

Android Problem Overview


I'm trying to run helloandroid application on a Motorola Milestone A853. I typed "adb devices" and the mobile is properly recognized. However, when I try to run the application Eclipse always stuck at 27% "Launching delegate".

Which could be the reason?

Android Solutions


Solution 1 - Android

Had the same 27% problem with an emulator. It only got fixed after I deleted the AVD and recreated it, so this is very likely device/emulator related (and furthermore restarting the ADB did not fix the problem).

EDIT:

Found this over at project pages as Issue #21073, answered by benpar:

Update: This scenario can also be avoided if the AVD emulator is launched from the AVD Manager within Eclipse. The issue happens when launching the first emulator from the Run button in Eclipse.

To avoid:

  1. Start Eclipse
  2. Window -> AVD Manager
  3. Start an emulator
  4. Run the project

Solution 2 - Android

I also had this problem when running an application in the emulator. Make sure the emulator is running BEFORE launching the app and you wont have this issue.

Solution 3 - Android

To get further information, try installing and launching the application from the command line outside of Eclipse. You'll find your .apk in the /bin folder of your project, then use:

adb install -r <projectname>.apk

It may work and if not, you may get better information about the cause of the error. My experience with Eclipse has shown that it can be finicky at times and this should help you isolate the issue.

Solution 4 - Android

I had the same stuck at 27% problem. Unplugging the device and plugging it back in fixed it.

Solution 5 - Android

I've found that the quickest way is to check with the Android Debug Bridge on the command line. Sometimes all it takes is stopping and starting the adb server. That is:

adb kill-server

Will stop the server. Then:

adb start-server

That should do it. Check the attached devices ( but it's not necessary )

adb devices

and it lists the devices attached.
Then go back to eclipse and start debugging again.

This can also be done in the Devices view through Eclipse.

Solution 6 - Android

I got the solution of this problem bit silly one. What i did was started emulator from one instance of eclipse.. Closed eclipse. Closing eclipse wont stop the emulator. Now re-launch eclipse. Now run your application in the emulator already running.

Solution 7 - Android

Very annoying problem. I was having to close down eclipse and the emulator and then start up again which became time consuming. Came here and read what Anna Lear and Vinay posted. Worked! I think in my case this problem happened because I exited eclipse while the emulator was still running. To correct, as Anna and Vinay posted, do this...

Make sure eclipse and emulator are shut down, then...

  1. start elipse
  2. start emulator
  3. quit eclipse (do not quit the emulator)
  4. start eclipse
  5. now run your program (should load 100% and not get stuck)

Solution 8 - Android

For me it was the ADB which had hung. No amount of quitting either eclipse or the emulator had any effect.

  1. Terminate the emulator
  2. Terminate the ADB, (I simply killed its process using task manager.
  3. Start the emulator again, (also causes the ADB to restart)
  4. Run your program

It should no longer get stuck.

Solution 9 - Android

I was using Samsung Galaxy to run the app. I wasted a lot of time in running app but it was not launching and i had to restart eclipse every time. For me, i just follow these steps and there was no problem any more

  • removed my device from my PC
  • Run the app
  • When it asks for attach your device or create AVD.
  • I reconnect my device and select for output.
  • Finally i resolved the issue

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJupiter JonesView Question on Stackoverflow
Solution 1 - AndroidubzackView Answer on Stackoverflow
Solution 2 - AndroidJohno ScottView Answer on Stackoverflow
Solution 3 - AndroidJerry BradyView Answer on Stackoverflow
Solution 4 - AndroiddvsView Answer on Stackoverflow
Solution 5 - AndroidkarolView Answer on Stackoverflow
Solution 6 - AndroidVinayView Answer on Stackoverflow
Solution 7 - AndroiddroidsmithView Answer on Stackoverflow
Solution 8 - AndroidThe RockncoderView Answer on Stackoverflow
Solution 9 - Androidzeeshan haiderView Answer on Stackoverflow