问题
I'm attempting to write my first android app, HelloAndroid. The error in the title occurs whenever I try to run it on the emulator. This reliably happens with any AVD I create, and when I launch the AVD itself before running the app.
Edit: Running the app on a real device works fine.
Also, running the emulator from command line with the -verbose
option shows that the emulator hangs after the following:
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
.
(Using an AVD with or without the camera enabled has no effect.)
Here's what I'm using for Android development:
- Windows 7 (64 bit)
- JDK 1.7.0
- Eclipse 3.7.1 (64 bit)
- Android SDK / AVD Manager, r16
- ADT Plugin 16.0.0
- AVD Manager
Here are potential solutions I've found on this site and others that I've tried so far (without success):
- Ensuring that there are no spaces in the path to the SDK (i.e., installing the SDK directly to the C:\ drive)
- Fresh install of Eclipse, Android SDK / AVD Manager, and the ADT plugin
- Running a 32 bit version of Eclipse
- Ensuring that Eclipse runs using the latest version of the JDK by changing the -vm path
- Changing the resolution of the AVD
- Deleting and re-creating an AVD
Any help would be greatly appreciated.
Edit: additional steps taken without success:
- Running Eclipse as an administrator
- Creating JAVA_HOME environment variable and setting value to path to JDK bin directory
- Using JDK 1.6 (for both eclipse and Windows)
- Running the emulator with no audio (recording or playback)
回答1:
Emulator crashes because it fails to allocate memory. Follow these steps to resolve the problem.
- Go to Window->Android Virtual Device Manager.
- Select your virtual emulator under "Android Virtual Devices" tab.
- Click "Edit" option which will open a new window.
- After, reduce RAM memory under "Memory options"
回答2:
I'd suggest you try doing as Necronet and Yury say. Added to that, ensure that you don't have your Android installed in C:/Program Files. Instead install it in C:/ directly.
回答3:
Here are some thoughs:
- Have you try running Eclipse as an Administrator (likely)
- Did you set PATH and JAVA_HOME* env variables correctly (long shot)
- Have try using JDK 1.6 (likely)
- Kill the emulator and re-runnit(likely)
- Just as @Rahul suggested you can try to install Android in a spaceless Folder ie. (C:\Program Files Try C:) (likely)
You might want to take a look at a problem I had a back ago and wrote a post about it on my blog. Altough is in spanish here is basicly it's a two step process idea:
JAVA_HOME should be the path where Android is installed as C:\Program Files\AndroidSDK\
Kill the emulator in your case you should terminate the process:
killall emulator -9
And runn the emulator without the audio:
emulator -audio none
But this solution was specific for linux and a problem with media back then.
Interesting thread:
Emulator freezing on start
回答4:
I've found the issue; it's not a bug at all.
As it turns out, I had a program called ATI Tray Tools running in the background to manage my graphics card, and this was causing the error (and several other errors with other programs unrelated to Android development). Disabling this program solved the issue. A very irritating and trivial problem... glad it's fixed.
Thank you for your suggestions, everyone!
回答5:
Its may be RAM error. Do this.
- Close emulator
- Go into AVD folder (eg. C:\Users\username.android\avd\phone.avd)
open config.ini file
modify disk.dataPartition.size from M to MB, suppose its value is 512M then change it to 512MB
do same for hw.ramSize from 512M to 512MB
If you have storage sd card then also change sdcard.size from 10M to 10MB
Start emulator again. You must do this for all your emulators. This works for me.
来源:https://stackoverflow.com/questions/8627098/android-emulator-crashes-emulator-arm-exe-stopped-responding