CymChad / CymChad/BaseRecyclerViewAdapterHelper
通过继承的方式传递布局报java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 24.6k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
使用这种继承的方式 传值 报
java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
at com.chad.library.adapter.base.BaseQuickAdapter.createBaseViewHolder(BaseQuickAdapter.java:694)
at com.chad.library.adapter.base.BaseQuickAdapter.onCreateViewHolder(BaseQuickAdapter.java:546)
请问 有没有人解决过这个问题
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 at BaseQuickAdapter.java:694 and trace the inherited layout path that reaches createBaseViewHolder, then compare it with the call from onCreateViewHolder at line 546. Reproduce the reported ClassCastException using the inheritance pattern shown in the issue; done means inherited layout passing no longer throws that exception and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100