1

I am getting the above error whenever I test on an emulator, but not any devices I have tested on. Can anyone suggest why this might happen ?

Mohammed Azharuddin Shaikh
  • 39,642
  • 13
  • 90
  • 114
GuybrushThreepwood
  • 5,394
  • 9
  • 50
  • 110

1 Answers1

3

You are probably testing on high profile devices that might have 32Mb or more heap size memory. The emulator could be using 24Mb and that's the reason is crashing.

Go to the AVD (Android Virtual Device) editor, and add "Max VM application heap size" to your virtual device hardware properties. Set that value to 32Mb and reboot your emulator.

That should be enough.

If you want to learn more about heap memory I recommend you to read this question.

Community
  • 1
  • 1
Xavi Gil
  • 10,764
  • 3
  • 51
  • 67