Android Emulator Won't Run Application Started from Eclipse

Android Emulator won't run application started from eclipse

Same here; emulator loads fine but apk doesn't get installed. Problem is only with the emulator. All works fine if physically connecting a device with USB debugging turned on.

NB This suddenly started happening for no apparent reason. All used to work fine.

I've tried uninstalling and reinstalling the ADT Plugin and I've updated the Android SDK and AVD Manager to the latest available. (Tools revision 7) but the problem continues.

Eclipse: Helios Service Release 1
Build id: 20100917-0705
Running on Windows XP SP2

Just as others have posted, the console log shows

[2010-10-14 11:39:33 - uad-MediaPlayerExample] ------------------------------
[2010-10-14 11:39:33 - uad-MediaPlayerExample] Android Launch!
[2010-10-14 11:39:33 - uad-MediaPlayerExample] adb is running normally.
[2010-10-14 11:39:33 - uad-MediaPlayerExample] Performing com.msi.manning.chapter10.MediaPlayerExample.MediaPlayerActvity activity launch
[2010-10-14 11:39:33 - uad-MediaPlayerExample] Automatic Target Mode: launching new emulator with compatible AVD '1.6-hvga'
[2010-10-14 11:39:33 - uad-MediaPlayerExample] Launching a new emulator with Virtual Device '1.6-hvga'

LogCat remains empty/blank.

And if I then try to re-run the same app, the console shows:

[2010-10-14 11:39:33 - Emulator] emulator: ERROR: the user data image is used by another emulator. aborting

POSSIBLE ANSWER???
One solution seems to be to kill the adb.exe process in Windows Task Manager (while the emulator is still running).
screenshot of task manager

(from http://vikashazrati.wordpress.com/2008/01/01/quicktip-android-does-not-load-my-application-in-the-emulator/)

The console suddenly shows lots of errors:

[2010-10-14 12:12:00 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:01 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:01 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:02 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:02 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:03 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:03 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:04 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:04 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:05 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:05 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:06 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:06 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host

but the app starts in the emulator. !!!

(as expected the LogCat also suddenly starts to display lots of messages)

All works fine - i.e. you can work on your code and re-run the app in the same emulator and it reinstalls as expected...

BUT if you close the emulator, you see the following console error:

[2010-10-14 12:15:05 - DeviceMonitor]Sending jdwp tracking request failed!

And the same problem reoccurs - a new emulator appears but the apk isn't installed. So you need to go back to Windows Task Manager and once again kill the adb.exe process.

NB I find that adb.exe doesn't reappear in the Task Manager unless I restart Eclipse, so after closing an emulator you have to restart Eclipse, try Run (which fails to display the app) then go back to the Task Manager where adb.exe is once again listed and kill the process for the app to start.

Would be great if someone could provide an explanation for this and a permanent fix...

Android Emulator Won't Start App on Eclipse

First of all, verify that the Launch Action of your Run configuration is what you are expecting (Launch Default Activity or Launch a specific Activity).

If everything looks fine but the Activity is not being launched you can try doing it from the command line:

$ adb shell am start -n your.package/your.package.YourActivity

Eclipse Android Emulator won't launch

I guess its a bug affecting the latest versions of the ADTs perhaps has something to do with NVIDIA GPUs drivers. The issue is discussed here:

https://groups.google.com/forum/?fromgroups#!topic/adt-dev/nlA07toW1fc

The work around that I have found which at least lets me execute my applications till a permanent solution is released, is that by first launching the emulator from shell even if it throws the error. After which i right-click and run my projects as an "Android application". The emulator does surprisingly execute them!

eclipse: android emulator running, but program not starting

try restarting your adb
open up your console and type in

adb kill-server

then

adb start-server

Android application doesn't start from Eclipse

I've run into this situation many times and have had to do several things to resolve the issue.

1) If DDMS is running, close it (it seems to interfere with debugging sometimes).

2) Start the emulator, try connecting with DDMS, then disconnect, then go back to eclipse and start the debuggerer.

3) Kill the emulator, kill the adb process in task manager, restart eclipse, then try debugging letting Eclipse launch the emulator, sometimes the first load of the emulator times out so when it's fully started up, start debugging again.

Overall though, I've found it is much easier to not use the emulator and use an actual device, for me it's a much faster process.

Eclipse does not launch the Android emulator and won't install app

Okay, I found the problem. Under Properties > Run/Debug Settings I forgot to set the project name.

Sample Image



Related Topics



Leave a reply



Submit