可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I have been having issues running my first android app. Yesterday, i came close to running it but my happiness was dashed when i encountered this error:
emulator-arm.exe has stopped working
What do i do? I want to run this 'Hello World'
My Console Display:
[2011-07-28 10:46:52 - HelloAndroid] Android Launch!
[2011-07-28 10:46:52 - HelloAndroid] adb is running normally.
[2011-07-28 10:46:52 - HelloAndroid] Performing com.bestvalue.hello.HelloAndroid activity launch
[2011-07-28 10:46:52 - HelloAndroid] Automatic Target Mode: Preferred AVD 'my_avd' is not available. Launching new emulator.
[2011-07-28 10:46:52 - HelloAndroid] Launching a new emulator with Virtual Device 'my_avd'
[2011-07-28 10:47:13 - Emulator] emulator: emulator window was out of view and was recentred
[2011-07-28 10:47:13 - Emulator]
[2011-07-28 10:47:14 - HelloAndroid] New emulator found: emulator-5554
[2011-07-28 10:47:14 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2011-07-28 10:47:28 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.bestvalue.hello.HelloAndroid activity launch'!
回答1:
Change the resolution of the device and it should work. It didn't work for me when the resolution was 1280X800. I changed it to 800X600 and it worked fine.
回答2:
After many attempts to fix, I found the following most helpful: Android: failed to allocate memory
Running the emulator with 512mb of ram or less seems to be the only solution so far for me. Thanks
回答3:
Here's how to fix it and keep your desired amount of RAM:
- Go into the AVD folder (example: C:\Users\username\.android\avd\phone.avd)
- Open the "config.ini" file in Wordpad.
- Modify the 'partition' and 'ram' lines to end in "MB" (See below for the proper syntax changes)
ORIGINAL: disk.dataPartition.size=512M
MODIFIED: disk.dataPartition.size=512MB
ORIGINAL: hw.ramSize=1024
MODIFIED: hw.ramSize=1024MB
Save the file, and then run the emulator again (e.g. "emulator.exe -avd phone"). You must repeat this process for each of your AVDs.
回答4:
Might be old question but try executing directly from command line, assuming you are in android-sdk\tools
folder run your created emulator by calling emulator-arm @youremulatorname
回答5:
After some minutes searching Google and eventually Stackoverflow I finally came across a fix. Only way for reliably generate the crash during my experimentation was changing RAM size to 128 and in fact, many crashes depend on 2 problem:
- PC Ram is less or equal to one defined in AVD. You must set it lower depending on your hardware RAM.
- Also, some graphic and OpenGL issues found that can be fixed by changing default display to HVGA or setting a lower resolution in AVD.
Good luck!
回答6:
emulator-arm.exe is not working due dual graphic card. select the basic graphical card not high performance one and is going to work. I have nvidia 555M and as bases Intel. Using intel the emulator starts.
回答7:
i found tht using the avd manager to delete and recreate the virtual device without checking the snapshot enabled check box while creating the avd works. i found this on google group for android. although this issue hasnt been resolved, this method can be used as a workaround for this problem until this bug is fixed
回答8:
Two options worked for me:
1. Changing the emulator resolution. I don't know why, but if I change it, it just works.
2. Changind the "Number of emulated web cameras" variable to 0 in AVD.
Thank you very much for the help!!
回答9:
Marking "Use Host GPU" checkbox worked for me.
回答10:
Finally solved this for me after trying all the options above. There is a solution at AndroidDevelopers on Google Plus.
If you want to have graphics acceleration enabled by default for this
AVD, in the Hardware section of the AVD configuration, click New,
select GPU emulation and set the value to Yes.
回答11:
My case was that the skin setting somehow had been changed from WVGA800 to WVGA854 in AVD. After I switch it back, the emulator works.
回答12:
Go to Window->Open Prespective->DDMS
you will see view as mention below
click on the portion i have highlighted and click on reset adb,and try to run your project again
回答13:
If you don't see an emulator running, check Task Manager to see if you have an emulator-arm
process already running. If there is an emulator-arm
process, select it, choose "End Process", and try again.
回答14:
In my case, I had to set memory RAM from 1907 (default) to 512 to get it working
回答15:
Just rebooting my PC worked for me.
回答16:
Use a low resolution device, when I selected Nexus 4
it kept running smoothly with me.
回答17:
Also worth checking that HAXM is installed/enabled (this fixed issue for me, without it got same error as you were reporting and it slowed my Mac to a crawl).