yyy000112 2017-02-08 07:45 采纳率: 43.8%
浏览 3496
已结题

使用fresco框架加载图片时,一次性加载70多张就会出现OOM,该如何解决

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

  • 写回答

4条回答 默认 最新

  • 依风听雨锋 2017-02-08 09:21
    关注

    为什么要用scrollview嵌套recycleview,分页加载还是要的,即便没有分页加载也不会一次性全部加载吧,按道理本身应该recycleview只会加载显示的图片的

    嵌套滚动可以看看NestedScrollView

    评论

报告相同问题?

悬赏问题

  • ¥15 镍氢电池充电器设计实物使用原理
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥200 关于#c++#的问题,请各位专家解答!网站的邀请码
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?