Eclipse gets stuck when trying to launch Android a

2019-01-10 12:04发布

问题:

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?

回答1:

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


回答2:

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.



回答3:

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.



回答4:

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



回答5:

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.



回答6:

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.



回答7:

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)


回答8:

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.



回答9:

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