vinc3m1/RoundedImageView

OOM问题怎么处理呀?

pt198912 opened this issue · 2 comments

Caused by java.lang.OutOfMemoryError
Failed to allocate a 2700012 byte allocation with 1466280 free bytes and 1431KB until OOM
dalvik.system.VMRuntime.newNonMovableArray (VMRuntime.java)
android.widget.ImageView. (ImageView.java:145)
com.makeramen.roundedimageview.RoundedImageView. (RoundedImageView.java:90)
com.makeramen.roundedimageview.RoundedImageView. (RoundedImageView.java:86)
java.lang.reflect.Constructor.newInstance0 (Constructor.java)

这个就根据你的情况来吧。比如在recyclerView、listview里面一次性加载太多图片,可以修改为只加载当前页中可见的图片。

如果单张图片太大,可以先压缩、软加载