banner 大佬,已经设置了声明周期观察OutOfMemoryError

vfh0ocws  于 2022-11-19  发布在  其他
关注(0)|答案(2)|浏览(172)

已经添加了声明周期观察
出错堆栈

1 dalvik.system.VMRuntime.newNonMovableArray(Native Method)
2 android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
3 android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:664)
4 android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:488)
5 android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1157)
6 android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:873)
7 android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:667)
8 android.content.res.Resources.getDrawable(Resources.java:900)
9 android.content.Context.getDrawable(Context.java:537)
10 android.widget.ImageView.resolveUri(ImageView.java:890)
11 android.widget.ImageView.setImageResource(ImageView.java:444)
12 com.yunduo.lyoa.fragment.HomeFragment$1.onBindView(HomeFragment.java:123)
13 com.yunduo.lyoa.fragment.HomeFragment$1.onBindView(HomeFragment.java:119)
14 com.youth.banner.adapter.BannerAdapter.onBindViewHolder(BannerAdapter.java:41)
15 androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7065)
16 androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7107)
17 androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6012)
18 androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6279)
19 androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:288)
20 androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:345)

banner.setAdapter(bannerImageAdapter)
.addBannerLifecycleObserver(this)
.setIndicator(new RoundLinesIndicator(getContext()))
.setIndicatorSelectedWidth((int) BannerUtils.dp2px(15))
.setIndicatorGravity(IndicatorConfig.Direction.CENTER);

lmvvr0a8

lmvvr0a81#

能说下你的具体使用场景吗?有错误的demo最好,首先确定下你使用的是否是最新版本!

clj7thdc

clj7thdc2#

是最新版本,bugly显示的日志,出现过两次,最近也没咋出现。不好意思大佬,没有demo,如果我能确定导致此异常的使用场景再和您联系

相关问题