简体   繁体   中英

Android: Why won't my emulator launch?

I've created a simple test project and a generic emulator TestDevice . However, I can't get the app to launch.

I just get a console-type window (oddly placed partially off screen) and nothing happens.

I am developing in Eclipse (Helios 3.6) on Windows.

Here's the log:

[2011-05-11 10:08:04 - androidtest] Android Launch!
[2011-05-11 10:08:04 - androidtest] adb is running normally.
[2011-05-11 10:08:04 - androidtest] Performing androidtest.AndroidTestActivity activity launch
[2011-05-11 10:08:04 - androidtest] Automatic Target Mode: Preferred AVD 'TestDevice' is not available. Launching new emulator.
[2011-05-11 10:08:04 - androidtest] Launching a new emulator with Virtual Device 'TestDevice'
[2011-05-11 10:08:14 - androidtest] New emulator found: emulator-5554
[2011-05-11 10:08:14 - androidtest] Waiting for HOME ('android.process.acore') to be launched...

EDIT

Thanks for all the tips!

  • I am targeting Android 3.0 (API level 11)
  • I've ensured that I specified androidtest.AndroidTestActivity as the Launch Action
  • I've killed the adb process and restarted from Eclipse (even restarted Eclipse itself)
  • I've also launched the emulator manually from Window > Android SDK & AVD Manager

Still, same problem.

Solved. It wasn't a problem with the setup.

The emulator takes forever and a day to start up, that's all.

Optimizing Apps for Android 3.0 offers a tip on maximizing productivity with the emulator:

Tip: To improve the startup time for the emulator, enable snapshots for the AVD when you create it with the SDK and AVD Manager (there's a checkbox in the AVD creator to Enable snapshots). Then, start the AVD from the AVD manager and check Launch from snapshot and Save to snapshot. This way, when you close the emulator, a snapshot of the AVD state is saved and used to quickly relaunch the AVD next time. However, when you choose to save a snapshot, the emulator will be slow to close, so you might want to disable Save to snapshot after you've acquired an initial snapshot (after you close the AVD for the first time).

To disable the "Save to snapshot" option for AVDs launched by Eclipse add "-no-snapshot-save" to the Default emulator options under Preferences > Android > Launch.

There's a couple of features related to snapshots that are accessible via the command line, but unless you need to do some serious snapshot management, it's not particularly useful.

First start your emulator (window->Android SDK and AVD manager) Then run your application. Make sure the sdk versions are compatible!

it happens some times try to restart your adb. if on windows try to end adb service from task manager and run from eclipse again.

I always just delete my AVD phone and just make a whole new one. Then launch that and it'll open.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM