Closed 1Ezreal closed 11 months ago
这个错误是addType
的泛型和models里面的元素类型对应不上, 我不知道你集合里面是否有添加Integer
(Kotlin里面不存在这个类型)
如果还有问题请fork仓库复现此问题发给我链接(你自己将sample里面的类型改为Int就可以知道到底报不报错了)
这种简单问题请先自己运行试下, 我不希望回答太多这种问题浪费维护框架时间
1.4.0并不会出现这个问题,我写个demo试试是否是项目问题导致
改了Sample中 SimpleFragment的
addType SimpleModel->Int
直接报错
android.util.NoSuchPropertyException: Please add item model type : addType
的确存在这个问题, 和我为了适配集合泛型多类型需求有关, 该问题会在近期修复
你应该知道该bug已经早就被修复了吧
看到更新了0.0
问题描述
addType(R.layout.item_integral_sign)
Int类型报错,改为String/Integer类型正常
期望行为
正常
如何复现
截图
异常堆栈信息或者手机截图/视频(拖拽到输入框即可上传) android.util.NoSuchPropertyException: Please add item model type : addType(R.layout.item)
at com.drake.brv.BindingAdapter.getItemViewType(BindingAdapter.kt:197)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6608)
版本