CymChad / CymChad/BaseRecyclerViewAdapterHelper
使用BaseDataBindingHolder,混淆后崩溃
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 24.6k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
分析后,得出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 {
(...);
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with proguard-rules.pro and compare the rules for subclasses of BaseViewHolder with the reported BaseDataBindingHolder constructor case. Apply the constructor-preservation change described in the issue, then verify an obfuscated Android build no longer crashes and that dataBinding is initialized.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100