OutOfMemoryError: bitmap size exceeds VM budget

蹲街弑〆低调 提交于 2019-12-06 05:11:43

There seems to be a bug in the Android framework, although Google seems to deny it.

Did you read through issue 8488?

http://code.google.com/p/android/issues/detail?id=8488

I am not sure if this applies to your code - but you might try the recommendations before setting/updating the image on the ImageView.

Basically, it boils down to calling Bitmap.recycle(), nulling references (probably irrellevant in your case) and explicitly calling calling System.gc().

The garbage collector seems to run asynchronously and a new might fail even though memory could be freed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!