java.lang.OutOfMemoryError: bitmap size exceeds VM budget - Android

前端 未结 13 2010
醉话见心
醉话见心 2020-11-22 01:32

I developed an application that uses lots of images on Android.

The app runs once, fills the information on the screen (Layouts, Listviews,

13条回答
  •  没有蜡笔的小新
    2020-11-22 02:25

    Following points really helped me a lot. There might be other points too, but these are very crucial:

    1. Use application context(instead of activity.this) where ever possible.
    2. Stop and release your threads in onPause() method of activity
    3. Release your views / callbacks in onDestroy() method of activity

提交回复
热议问题