Skip to content Skip to sidebar Skip to footer

Android Java.lang.outofmemoryerror: Bitmap Size Exceeds Vm Budget

i've some leaks problems. What i'm doing is loading some pictures in a table. I've created an asyncronous class for loading images. In my table while i'm cycling the array I add m

Solution 1:

  1. Never load any tiles that you don't need. "am collecting all bitmaps from sdcard" suggests that you are decompressing every image you might ever need, which would be the wrong approach.

  2. Use smaller tiles. 256x256 is a good size.

  3. Load them as Config.RGB565 (i.e. 16bpp).

  4. Regularly recycle() Bitmaps you don't need.

Basically you need to implement some sort of most-recently-used (MRU) Bitmap cache

Extrated From

Android: "java-lang-outofmemoryerror-bitmap-size-exceeds-vm-budget-android" While loading bitmaps from sdcard?

Post a Comment for "Android Java.lang.outofmemoryerror: Bitmap Size Exceeds Vm Budget"