JakeWharton / RxBinding

RxJava binding APIs for Android's UI widgets.
Apache License 2.0
9.69k stars 971 forks source link

NoSuchMethodError No virtual method addOnTabSelectedListener #489

Closed lkishor closed 5 years ago

lkishor commented 5 years ago

Thanks for the awesome library Jake.

I am getting below error with 2.2.0 If i revert back to 2.1.1, It works without error I can't use 3.0.0-alpha since i am yet to migrate to androidx.

java.lang.NoSuchMethodError: No virtual method addOnTabSelectedListener(Landroid/support/design/widget/TabLayout$BaseOnTabSelectedListener;)V in class Landroid/support/design/widget/TabLayout; or its super classes (declaration of 'android.support.design.widget.TabLayout' appears in /data/app/***.*****.com-H-SGzE3IGWi2fqBZ662Tqg==/base.apk)

JakeWharton commented 5 years ago

I suspect this is caused because 2.2.0 uses support libraries 28.0.0 whereas 2.1.1 uses 27.0.2. As a result, it will update some of the libraries in use in your app. I suspect some other library is relying on an old method that no longer exists in 28.0.0. RxBinding itself does not reference that non-existent method nor use BaseOnTabSelectedListener so the problem actually lies elsewhere. You can perhaps use the dependencies task to see which libraries depend on old support library versions.