V3.25.99 版本报错
Hn1993 opened this issue · 4 comments
java.lang.OutOfMemoryError: Failed to allocate a 1042452 byte allocation with 797076 free bytes and 778KB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:812)
at android.graphics.Bitmap.createBitmap(Bitmap.java:789)
at android.graphics.Bitmap.createBitmap(Bitmap.java:756)
at com.coorchice.library.SuperTextView.drawDrawableBackground(SuperTextView.java:662)
at com.coorchice.library.SuperTextView.drawStateDrawable(SuperTextView.java:577)
at com.coorchice.library.SuperTextView.onDraw(SuperTextView.java:393)
at android.view.View.draw(View.java:15231)
at android.view.View.updateDisplayListIfDirty(View.java:14167)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.draw(View.java:15234)
at android.view.View.updateDisplayListIfDirty(View.java:14167)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at androidx.recyclerview.widget.RecyclerView.drawChild(RecyclerView.java:4820)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.draw(View.java:15234)
at androidx.recyclerview.widget.RecyclerView.draw(RecyclerView.java:4219)
at android.view.View.updateDisplayListIfDirty(View.java:14167)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.updateDisplayListIfDirty(View.java:14162)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.draw(View.java:15234)
at android.widget.FrameLayout.draw(FrameLayout.java:598)
at androidx.core.widget.NestedScrollView.draw(NestedScrollView.java:1931)
at android.view.View.updateDisplayListIfDirty(View.java:14167)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.draw(View.java:15234)
at androidx.viewpager.widget.ViewPager.draw(ViewPager.java:2426)
at android.view.View.updateDisplayListIfDirty(View.java:14167)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.draw(View.java:15234)
at android.view.View.updateDisplayListIfDirty(View.java:14167)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.draw(View.java:15234)
at androidx.viewpager.widget.ViewPager.draw(ViewPager.java:2426)
at android.view.View.updateDisplayListIfDirty(View.java:14167)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.updateDisplayListIfDirty(View.java:14162)
at android.view.View.getDisplayList(View.java:14189)
at android.view.View.draw(View.java:14959)
at android.view.ViewGroup.drawChild(ViewGroup.java:3429)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3222)
at android.view.View.updateDisplayListIfDirty(View.java:14162)
at android.view.View.getD
上面是报错信息
下面是代码具体使用
<com.coorchice.library.SuperTextView
android:id="@+id/tab_others_explosion_rv_image"
android:layout_width="match_parent"
android:layout_height="@dimen/px310"
app:stv_corner="@dimen/px30"
app:stv_right_top_corner="true"
app:stv_left_top_corner="true"
android:layout_centerHorizontal="true"
app:stv_state_drawable="@mipmap/icon_bag"
app:stv_drawableAsBackground="true"/>
###报错场景
在recyclerview中使用SuperTextView(加载item圆角图片) 图片数量过多 就会报上面的错误 使用Imageview则不会
、可能文件太大导致oom了,不是库问题
、可能文件太大导致oom了,不是库问题
有可能 但是为啥ImageView则不会出现这个问题呢
麻烦不要问这样问题,让作者会很烦
麻烦不要问这样问题,让作者会很烦
并不觉得提issue 会发生什么让作者很烦的事情,觉得很好用,也一直在用,遇到报错信息,所以贴出来给作者看。如果是库的问题则可以解决,也算是支持这个开源库,让这个库变得更好。如果是使用方式的问题也可以得到指导,不太能理解你说的让作者很烦是指哪里?