Friday, July 10, 2015

Android: solution fail: AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.OutOfMemoryError

If you're trying to run a app in a device or emulator and this present this message:

Error: "fatal exception  AndroidRuntime at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)"
AndroidRuntime: FATAL EXCEPTION: main java.lang.OutOfMemoryError 

Solution: Change the size of the image, example: try reduce the sixe of the image with Gimp, or Microsoft Office (the image editor).

More help: http://developer.android.com/training/displaying-bitmaps/index.html

No comments:

Post a Comment