Jupiter Jones
Jupiter Jones

Reputation: 863

Eclipse gets stuck when trying to launch Android app

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?

Upvotes: 66

Views: 23352

Answers (9)

zeeshan haider
zeeshan haider

Reputation: 67

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

Upvotes: 0

karol
karol

Reputation: 368

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.

Upvotes: 4

The Rockncoder
The Rockncoder

Reputation: 359

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.

Upvotes: 0

droidsmith
droidsmith

Reputation: 31

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)

Upvotes: 2

Johno Scott
Johno Scott

Reputation: 1740

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.

Upvotes: 6

Vinay
Vinay

Reputation: 21

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.

Upvotes: 2

ubzack
ubzack

Reputation: 1876

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

Upvotes: 72

dvs
dvs

Reputation: 12432

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

Upvotes: 4

Jerry Brady
Jerry Brady

Reputation: 3079

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.

Upvotes: 4

Related Questions