ittianyu / BottomNavigationViewEx

An android lib for enhancing BottomNavigationView. 一个增强BottomNavigationView的安卓库。
MIT License
3.47k stars 558 forks source link

java.lang.NoSuchFieldException: No field mMenuView in class Landroid/support/design/widget/BottomNavigationView; (declaration of 'android.support.design.widget.BottomNavigationView' #126

Closed smoothdvd closed 6 years ago

smoothdvd commented 6 years ago

运行环境: Android Studio 3.3 canary 11, Android Sdk: 28, com.android.support库 28.0.0

harshalijain commented 6 years ago

I had to change the version of design library from 28.0.0 to 27.1.1 That solved the issue. But the library should update according to newer design libraries by Google

rafipanoyan commented 6 years ago

This exception seems to indicate that the support component BottomNavigationView no longer has a field named "mMenuView". The library tries to get that field using the getField(Class targetClass, Object instance, String fieldName) method (line 800) without finding it.

I don't know if the source code of the android support 28.0.0 is released yet, but we will have to wait for that release to fix the issue.

rafipanoyan commented 6 years ago

I made a PR for this issue : #128 Beware that this would require the use of android support 28.0.0 minimum from now on

ittianyu commented 6 years ago

I am sorry to be late. Please use version 2.0.0 if support lib >= 28. Version 27 is abandoned. For AndroidX, please add config into gradle.properties

android.useAndroidX=true
android.enableJetifier=true