Android Emulator: Failed to allocate memory: 8 even with 8MB RAM
I've had problems like this. The only way to fix it was to set it to either 256, 512 or 1024. I have no idea why it won't work with any random value.
Failed to allocate memory: 8
I figured it out. The problem was in the amount of ram I had specified for the virtual machine, and it was 1024MB, now I have 512MB and it is ok, now I need to find how to improve this amount of ram, 512 is not so much, and the machine is a little bit laggy.
Android emulator failed to allocate memory 8
Update: Starting with Android SDK Manager version 21, the solution is to edit C:\Users\<user>\.android\avd\<avd-profile-name>.avd\config.ini
and change the value
hw.ramSize=1024
to
hw.ramSize=1024MB
The emulator is really slow, hope they will release the intel images soon use the new API17 Intel x86 images if you want to change it .. (HAXM, Configuration)
Earlier Android SDK Manager releases:
Had the same problem with the built-in WXGA800 skin. I got it working by editing the virtual device setup to:
- Target 4.0.3 API 15 / 4.1.0 API 16
- SD-card 300MiB
- Resolution 1280 x 800 (set manually -not the built-in ones)
- Device ram size 1024MB (with MB added to the number)
- Abstracted LCD 160
Here my tablet config for 4.1.0 API 16C:\Users\<user>\.android\avd\<avd-profile-name>.avd\config.ini
hw.lcd.density=160
sdcard.size=300M
skin.path=1280x800
skin.name=1280x800
hw.cpu.arch=arm
abi.type=armeabi-v7a
hw.cpu.model=cortex-a8
vm.heapSize=48
hw.ramSize=1024MB
image.sysdir.1=system-images\android-16\armeabi-v7a\
This config shows the software keys too
Failed to allocate memory: 8 with WXGA720 skin
I am having the same problem. It appears to be an issue with the emulator. The solution they say is to downgrade to tools r19. There are zip on this site you can download. You just unzip and replace the tools folder in you sdk with the tools folder in the zip file. I just tried it and I got an error message saying I have tools r19 and I need tools r20 but I just closed the message and it seems to be working so far.
http://code.google.com/p/android/issues/detail?id=33930
Android 4.0.3 emulator crashes: Failed to allocate memory: 8
I do sometimes have the same problem. Maybe my solution works for you as well: Instead of choosing the WXGA720 skin preset, manually set the resolution to 720*1280, and manually set the RAM to 768 or even 512.
Seems stupid, but it makes a difference if the skin preset is uses or a manual resolution configuration.
Problems with Android ADT Bundle. Failed to allocate memory: 8
You've provided too few details, but let me try as a telepathist...
I think, this is an anwer to your question Android emulator failed to allocate memory 8
And even if it's not the answer, I don't think that you've already tried this solution
And even one more solution (which I use in case of AVD with high resolution). You may run your AVD from *.bat file, with following content:
cd C:\_my_folder\Android\android-sdk\tools
emulator-x86 @Intel_Android -memory 896
Android: failed to allocate memory
Solution to running a faster emulator:
http://androiddevnotes.com/2011/03/08/1299521520000.html
Runs my game a lot faster, comparable to phone quality.
-- Update 08/24/12 --
I see that people still come here and comment on this answer, and I have done more research on this issue. I present to you the results of my findings.
NOTE: These tests were run on my computer, your computer may be different.
- Running an Android 2.2 (armeabi) emulator with Property 'Device ram size' = 2048 will
fail, just as before - Running an Android 2.2 (armeabi) emulator with Property 'Device ram size' = 2048 MB will pass, however if you actually check the ram on the device, its around 128 MB.
- check 1: Settings > Applications > Running Services - add all the numbers on the bottom of the screen
- check 2: run the following command in adb shell:
cat /proc/meminfo/
and note the MemTotal field
- Running an Android 4.1 (armeabi-v7) emulator with Property 'Device ram size' = 2048 will work, however if you actually check the ram on the device its around 512 MB
- check 1: Settings > Apps > Running tab - add all the numbers on the bottom of the screen
- check 2: run the following command in adb shell:
cat /proc/meminfo/
and note the MemTotal field
- Running an Android 4.1 (armeabi-v7) emulator with Property 'Device ram size' = 2048 MB will work as well, but with the same results as 3.
Conclusion
Adding 'MB' as noted in some of the comments below may allow your device to be launched, however it doesn't actually have 2 GB of RAM. Even with a 4.1 Emulator, the RAM Size is at 512 MB.
Recommendation
Please use an actual device for testing.
Related Topics
Marking Sms Messages as Read/Unread or Deleting Messages Not Working in Kitkat
How to Define Different Dependencies for Different Product Flavors
Using Android Vector Drawables on Pre Lollipop Crash
Access the Http Response Headers in a Webview
How to Implement Getfilter() with Custom Adapter That Extends Baseadapter
Understanding Command Through Adb Shell and Through Code - Android
Use Tab with New Toolbar (Appcompat V7-21)
Android - Linearlayout Horizontal with Wrapping Children
Error - Android Resource Linking Failed (Aapt2 27.0.3 Daemon #0)
Upload Photo to Facebook with Facebook Android Sdk in Android
Unresolved Reference - Activity Does Not Recognize Synthetic Imports in Android Studio V4
Programmatically Update Widget from Activity/Service/Receiver
Get Uri of .Mp3 File Stored in Res/Raw Folder in Android
How to Disable Past Dates in Android Date Picker
Execution Failed for Task 'App:Mergedebugresources' Crunching Cruncher....Png Failed
Settext Fails to Show a Number as Text in a Textview