1

I am trying to create emulator with FULL HD resolution (1980 x 1080), but while starting I am getting following error :

Starting emulator for AVD 'emu' Failed to allocate memory: 8 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

any one have idea why this error occur, and how can I create full HD resolution emulator?

CoDe
  • 11,056
  • 14
  • 90
  • 197
  • 2
    related: http://stackoverflow.com/questions/7222906/failed-to-allocate-memory-8 http://stackoverflow.com/questions/11667907/android-emulator-failed-to-allocate-memory-8 http://stackoverflow.com/questions/11281667/android-emulator-failed-to-allocate-memory-8-even-with-8mb-ram http://stackoverflow.com/questions/11709988/failed-to-allocate-memory-8-with-wxga720-skin – Ray Tayek Dec 11 '12 at 07:00
  • Thanks..I am able to create fresh emulator..but it not displaying anything on screen..adb working..nay idea about why display is not coming? – CoDe Dec 11 '12 at 07:05

2 Answers2

6

This following solution worked for me. In the following configuration file:

C:\Users\<user>\.android\avd\<avd-profile-name>.avd\config.ini

Replace

hw.ramSize=1024

by

hw.ramSize=1024MB

If not work above then setting below.

hw.lcd.density=160
sdcard.size=300M
skin.path=1980x1080
skin.name=1980x1080
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\
Nirav Ranpara
  • 13,753
  • 3
  • 39
  • 54
  • I created new fresh emulator and give resolution 1980X1080. it started without any error..but not displaying anything..I checked logcat it started but not showing anything on screen? any idea about it? – CoDe Dec 11 '12 at 06:56
  • thanks! The manual edit of the config.ini file worked for me! This was driving me nuts. the only change I had to make was hw.ramSize=1024MB (the stock eclipse AVD editor didn't have the 'MB' part when it created the .ini) – Octoth0rpe Jan 05 '13 at 00:28
0

This is working for me to create avd

android create avd  -n test -t 1 -b armeabi-v7a -s 1980x1080

then to start

emulator -avd test -initdata userdata.img -ramdisk ramdisk.img -system system.img -sdcard songs_for_music_app/Music_card.img  -dpi-device 240

You can find all images here

android-sdk/system-images/android-15/armeabi-v7a

and emularor and android commands can be found in android-sdk/platfor-tools and android-sdk/tools

Charan Pai
  • 2,288
  • 5
  • 32
  • 44
  • giving error 'android' is not recognized as an internal or external command, operable program or batch file. any idea what I am missing? – CoDe Dec 11 '12 at 06:58
  • I got android bat file in ../tools/..here I execute "android create avd -n test -t 1 -b armeabi-v7a -s 1980x1080" it's giving me "Error: Unable to find a 'userdata.img' file for ABI armeabi-v7a to copy into the AVD folder." when I chhose no for Do you wish to create a custom hardware profile [no]no option? any idea? – CoDe Dec 11 '12 at 07:02
  • just press enter for Do you wish to create a custom hardware profile [no]no option, and userdata.img can also be found in android-sdk/system-images/android-15/armeabi-v7a/ – Charan Pai Dec 11 '12 at 07:04
  • I also choose same option "no"..but it giving me error "Error: Unable to find a 'userdata.img' file for ABI armeabi-v7a to copy into the AVD folder." – CoDe Dec 11 '12 at 07:06
  • after pushing every option manually also I am getting at last "Error: Unable to find a 'userdata.img' file for ABI armeabi-v7a to copy into the AVD folder." and when I try to start it I am getting "PANIC: Could not open: C:\Users\my-laptop\.android/avd/test-try.ini" . – CoDe Dec 11 '12 at 07:15
  • check once in folder android-sdk/system-images/android-15/armeabi-v7a foe userdata.img file ..is it there ? – Charan Pai Dec 11 '12 at 07:19
  • yes I have updated version.. I am using android-16 and armeabi-v7a/userdata.img is there. – CoDe Dec 11 '12 at 07:22
  • You dont need userdata.img while creating, so check once C:\Users\my-laptop\.android/avd/test-try.ini file is created..if it exists and still you getting same error then open command prompt as admin and try again – Charan Pai Dec 11 '12 at 07:29
  • and still if you cant, create avd in eclipse and try second command with your new avd name.. – Charan Pai Dec 11 '12 at 07:34
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/20928/discussion-between-shubh-and-charan) – CoDe Dec 11 '12 at 08:50