CymChad / BaseRecyclerViewAdapterHelper

BRVAH:Powerful and flexible RecyclerAdapter
http://www.recyclerview.org/
MIT License
24.32k stars 5.16k forks source link

使用BaseDataBindingHolder,混淆后崩溃 #3250

Open gzxg1234 opened 4 years ago

gzxg1234 commented 4 years ago

分析后,得出proguard-rules.pro文件有问题 -keep public class * extends com.chad.library.adapter.base.viewholder.BaseViewHolder -keepclassmembers class $ extends com.chad.library.adapter.base.viewholder.BaseViewHolder {

(...); } 上述规则没有保留住BaseDataBindingHolder的构造方法,导致dataBinding属性没有被赋值 应改为 -keep public class * extends com.chad.library.adapter.base.viewholder.BaseViewHolder{ (...); } -keepclassmembers class **$** extends com.chad.library.adapter.base.viewholder.BaseViewHolder { (...); }
tapanrgohil commented 4 years ago

same issue

maoqiqi commented 4 years ago

+1

jianbo1124 commented 4 years ago

init没有显示 -keep public class extends com.chad.library.adapter.base.viewholder.BaseViewHolder{ \<init>(...); } -keepclassmembers class *$** extends com.chad.library.adapter.base.viewholder.BaseViewHolder { \<init>(...); }

Cedar-byte commented 3 years ago

版本用的3.0.4,加了也还是会报这个错误,除非传一个空的集合进去。