I/art: Starting a blocking GC Alloc
02-08 15:40:00.307 15871-15871/android.ye.fashioncircle I/art: Clamp target GC heap from 207MB to 192MB
02-08 15:40:00.307 15871-15871/android.ye.fashioncircle I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 191MB/192MB, paused 773us total 41.748ms
02-08 15:40:00.308 15871-15871/android.ye.fashioncircle I/art: Forcing collection of SoftReferences for 1406KB allocation
02-08 15:40:00.308 15871-15871/android.ye.fashioncircle I/art: Starting a blocking GC Alloc
02-08 15:40:00.349 15871-15871/android.ye.fashioncircle I/art: Clamp target GC heap from 207MB to 192MB
02-08 15:40:00.349 15871-15871/android.ye.fashioncircle I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 191MB/192MB, paused 789us total 40.572ms
02-08 15:40:00.351 15871-15871/android.ye.fashioncircle W/art: Throwing OutOfMemoryError "Failed to allocate a 1440012 byte allocation with 200488 free bytes and 195KB until OOM"
02-08 15:40:00.351 15871-15871/android.ye.fashioncircle D/skia: --- allocation failed for scaled bitmap
02-08 15:40:00.352 15871-15871/android.ye.fashioncircle D/AndroidRuntime: Shutting down VM
02-08 15:40:00.355 15871-15871/android.ye.fashioncircle I/art: Waiting for a blocking GC Alloc
02-08 15:40:00.361 15871-15871/android.ye.fashioncircle I/art: WaitForGcToComplete blocked for 5.461ms for cause Alloc
02-08 15:40:00.361 15871-15871/android.ye.fashioncircle I/art: Starting a blocking GC Alloc
02-08 15:40:00.673 7773-7780/android.ye.fashioncircle A/art: art/runtime/barrier.cc:90] Check failed: count_ == 0 (count_=-1, 0=0) Attempted to destroy barrier with non zero count
02-08 15:40:00.673 7773-7780/android.ye.fashioncircle A/art: art/runtime/runtime.cc:366] Runtime aborting --- recursively, so no thread-specific detail!
02-08 15:40:00.673 7773-7780/android.ye.fashioncircle A/art: art/runtime/runtime.cc:366]
这样的时候界面出现卡顿,然后就OOM闪退了
该如何解决。。。
页面是一个scrollview嵌套recyclerview使得分页加载失效,一次性加载了所有的图片
换成Glide和ImageLoader也是OOM
为什么要用scrollview嵌套recycleview,分页加载还是要的,即便没有分页加载也不会一次性全部加载吧,按道理本身应该recycleview只会加载显示的图片的
嵌套滚动可以看看NestedScrollView
给recycleview一个指定高度,使它不显示所有图片
http://blog.csdn.net/rongbinjava/article/details/51762526
加载多的时候分页加载还是必要的