Android OutOfMemoryError : bitmap size exceeds VM budget

前端 未结 2 782
日久生厌
日久生厌 2021-01-16 01:57

i am facing a problem of OutOfMemoryError that is bitmap size exceeds vm budget while changing the orientation of the Droid mobile (but not in any of other mobiles like Andr

2条回答
  •  醉梦人生
    2021-01-16 02:35

    Ensure two things:
    1. Make sure you are not leaking memory. More info here http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.html
    2. Reduce the Bitmap memory. Check if downsampling Bitmaps in an option. More info here Strange out of memory issue while loading an image to a Bitmap object.

    Check SO for "Handling large Bitmaps" and "OutOfMemoryError" I am sure that are plenty of discussions that can help you here.

提交回复
热议问题