Unable to start after increasing AVD memory in Android ADT: Emulator failed to allocate memory 8

Source: Internet
Author: User

In the process, after increasing the corresponding AVD memory to 2G, the result cannot start the AVD:

[2012-12-18 18:01:38–emulator] Failed to allocate Memory:8
[2012-12-18 18:01:38–emulator]
[2012-12-18 18:01:38–emulator] This application have requested the Runtime to terminate it on an unusual.
[2012-12-18 18:01:38–emulator] Please contact the application's support team for more information.

"Resolution Process"

1. So, re-change the small 1G test:

As a result, the problem remains.

2. Reference:

Android emulator:failed to allocate memory:8 even with 8MB RAM

Say yes, it's only 256/512/1024.

But obviously, it doesn't work if I change it to 1024.

Referring to the last person's explanation, go to 900MB and see log as:

[2012-12-18 18:16:04–SDK Manager] Snapshot image already present, is not changed.
[2012-12-18 18:16:04–SDK Manager] SD Card already present with same size, is not changed.
[2012-12-18 18:16:04–SDK Manager] Updated AVD ' samsunggalaxysii ' based on Android 4.2, ARM (armeabi-v7a) processor,
[2012-12-18 18:16:04–SDK Manager] with the following hardware config:
[2012-12-18 18:16:04–sdk Manager] Hw.sdcard=yes
[2012-12-18 18:16:04–sdk Manager] Hw.device.manufacturer=google
[2012-12-18 18:16:04–sdk Manager] Hw.mainkeys=yes
[2012-12-18 18:16:04–sdk Manager] hw.lcd.density=240
[2012-12-18 18:16:04–sdk Manager] Hw.accelerometer=yes
[2012-12-18 18:16:04–sdk Manager] Hw.dpad=no
[2012-12-18 18:16:04–sdk Manager] hw.device.hash=499058361
[2012-12-18 18:16:04–sdk Manager] Hw.trackball=no
[2012-12-18 18:16:04–sdk Manager] Hw.device.name=nexus S
[2012-12-18 18:16:04–sdk Manager] Hw.camera.back=none
[2012-12-18 18:16:04–sdk Manager] Hw.sensors.proximity=yes
[2012-12-18 18:16:04–sdk Manager] Hw.battery=no
[2012-12-18 18:16:04–sdk Manager] disk.datapartition.size=200m
[2012-12-18 18:16:04–sdk Manager] Hw.audioinput=yes
[2012-12-18 18:16:04–sdk Manager] Hw.sensors.orientation=yes
[2012-12-18 18:16:04–sdk Manager] Hw.camera.front=none
[2012-12-18 18:16:04–sdk Manager] Hw.gps=yes
[2012-12-18 18:16:04–sdk Manager] Skin.dynamic=no
[2012-12-18 18:16:04–sdk Manager] Hw.keyboard=no
[2012-12-18 18:16:04–sdk Manager] vm.heapsize=32
[2012-12-18 18:16:04–sdk Manager] hw.ramsize=900

Then try again, the result is still wrong.

3. It is possible to change back to the previously configured 512MB.

But not what I want, want to, try to make the memory larger, so that I hope to let the AVD simulator run faster, not so slow.

4. Then go to 768MB, and the result is inconsistent with the previous snapshot, so not to start:

[2012-12-18 18:19:00–downloadsongtastemusic] ——————————
[2012-12-18 18:19:00–downloadsongtastemusic] Android launch!
[2012-12-18 18:19:00–downloadsongtastemusic] adb is running normally.
[2012-12-18 18:19:00–downloadsongtastemusic] Performing crifan.com.downloadsongtastemusic.MainActivity activity launch
[2012-12-18 18:19:00–downloadsongtastemusic] Automatic Target mode:launching new emulator with compatible AVD ' samsunggalaxysii '
[2012-12-18 18:19:00–downloadsongtastemusic] Launching a new emulator with Virtual Device ' samsunggalaxysii '
[2012-12-18 18:19:00–emulator] emulator:ERROR:Unable to load VMS from snapshot. The snapshot have been saved for a different hardware configuration.

5. So, first go to remove snapshot, and then start, after the start, close off, again check the snapshot.

The result is also the same tip:

Error:unable to load VMs from snapshot. The snapshot have been saved for a different hardware configuration

So, estimates can only be deleted, re-build one, perhaps only.

6. Re-create an AVD:

Then try the effect with this AVD.

Then it can be started.

But the speed is still very slow.

6. Continue to refer to the sticker, first set to 1024MB,

And then go back to:

C:\Users\CLi\.android\avd\SamsungGalaxySII.avd\config.ini

In the following:

hw.ramsize=1024

Switch

Hw.ramsize=1024mb

Then run the test and the result appears:

Emulator] emulator:ERROR:Unable to load VMS from snapshot. The snapshot have been saved for a different hardware configuration.

Again to cancel the snapshot, and then run, it is indeed possible to run.

Summary

The conclusion is:

There is currently a bug:

The default is through

hw.ramsize=1024

To determine the size of the memory, but when it is >=1024, it is not recognized correctly.

You must manually put the corresponding

C:\Users\CLi\.android\avd\SamsungGalaxySII.avd\config.ini

In the

hw.ramsize=1024

Switch

Hw.ramsize=1024mb

You can do it.

Tips:

1. After manual change, the result will not display correctly in the interface:

In short, still very sad urge, bug still very big say.

2. Although instead of 1024MB, or even 2048MB, but actually run the AVD, it looks like the original (I chose the device Nexus) 343MB:

In short, more pit dad ...

Unable to start after increasing AVD memory in Android ADT: Emulator failed to allocate memory 8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.