Tuesday, February 26, 2013

How to fix Android emulator problem when encounter error message " Failed to allocate memory: 8"?

With the great demand for Android app, recently I have to pick up the Android skillset again.

First obstacle, when run my Android app in emulator, the error as shown below is displayed in the Eclipse console.
[2013-02-27 12:33:22 - Emulator] Failed to allocate memory: 8
[2013-02-27 12:33:22 - Emulator] This application has requested the Runtime to terminate it in an unusual way.
[2013-02-27 12:33:22 - Emulator] Please contact the application's support team for more information.

How to solve?

  1. Right click on your Android project, select "Run As" -> "Run Configurations"
  2. Select "Target" tab
  3. Select the AVD that your are using, curently I'm using "AVD_for_Nexus_7_by_Google", click on "Manager" button
  4. In the new dialog Window, select "AVD_for_Nexus_7_by_Google" and click on "Edit" button
  5. Change the "Memory Options" RAM from 1024 to 512.
Voila, I have loaded my app on emulator successfully.

No comments: