CymChad / CymChad/BaseRecyclerViewAdapterHelper

3.0.7 设置点击事件setOnItemClickListener ,崩溃。环境为:最新版android studio ,gradle-7.2

Open
#3,614 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
24.6k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

Process: com.example.customviewpractice, PID: 20961
java.lang.NoSuchMethodError: No virtual method getBindingAdapterPosition()I in class Lcom/chad/library/adapter/base/viewholder/BaseViewHolder; or its super classes (declaration of 'com.chad.library.adapter.base.viewholder.BaseViewHolder' appears in /data/app/~~8WzCj7ns9uA2FADz3qLBHQ==/com.example.customviewpractice-eGLrtTObX928prmWXbfBNQ==/base.apk)
at com.chad.library.adapter.base.BaseQuickAdapter.bindViewClickListener$lambda-7$lambda-6(BaseQuickAdapter.kt:495)
at com.chad.library.adapter.base.BaseQuickAdapter.$r8$lambda$aqWf9Mix2Hshed6QsGcdRVGlHL8(Unknown Source:0)
at com.chad.library.adapter.base.BaseQuickAdapter$$ExternalSyntheticLambda0.onClick(Unknown Source:4)
at android.view.View.performClick(View.java:7750)
at android.view.View.performClickInternal(View.java:7727)
at android.view.View.access$3700(View.java:861)
at android.view.View$PerformClick.run(View.java:29133)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8087)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at BaseQuickAdapter.kt:495 and inspect how setOnItemClickListener calls getBindingAdapterPosition() on BaseViewHolder. Reproduce the crash with the reported Android Studio and Gradle 7.2 setup, then trace the library and dependency versions involved; done means item clicks no longer raise this NoSuchMethodError.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.