Closed huangfen closed 6 years ago
@huangfen 内存溢出的原因 1.这个实例加载的是高清的gif 2.你的手机内存有点低 3.SkidRightLayoutManager只是负责排列,你加载的资源占用内存大自然会内存溢出,内存溢出需要你自己在加载资源的时候处理
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.dingmouren.example.layoutmanagergroup, PID: 4512
java.lang.OutOfMemoryError: Failed to allocate a 721592 byte allocation with 214608 free bytes and 209KB until OOM
at com.bumptech.glide.gifdecoder.GifDecoder.setData(GifDecoder.java:380)
at com.bumptech.glide.load.resource.gif.GifDrawable.
java.lang.OutOfMemoryError: Failed to allocate a 960012 byte allocation with 225520 free bytes and 220KB until OOM
at com.dingmouren.example.layoutmanagergroup.activity.SkidRightActivity_1$MyAdapter.onBindViewHolder(SkidRightActivity_1.java:89) at com.dingmouren.example.layoutmanagergroup.activity.SkidRightActivity_1$MyAdapter.onBindViewHolder(SkidRightActivity_1.java:68)