Java – There is no static method combineMeasuredStates(II) when implementing bottom navigation when a View is navigated

There is no static method combineMeasuredStates(II) when implementing bottom navigation when a View is navigated… here is a solution to the problem.

There is no static method combineMeasuredStates(II) when implementing bottom navigation when a View is navigated

I’m trying to implement a Bottom Navigation View, but I get this error every time I run the project logcat

java.lang.NoSuchMethodError: No static method combineMeasuredStates(II)I in class Landroid/support/v7/widget/ViewUtils; or its super classes (declaration of 'android.support.v7.widget.ViewUtils' appears in /data/app/lungu.aubry.quick-2/split_lib_dependencies_apk.apk:classes28.dex)
              at android.support.design.internal.BaselineLayout.onMeasure(BaselineLayout.java:69)   
              at android.view.View.measure(View.java:17624)
              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5552)
              at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
              at android.view.View.measure(View.java:17624)
              at android.support.design.internal.BottomNavigationMenuView.onMeasure(BottomNavigationMenuView.java:143)
              at android.view.View.measure(View.java:17624)
              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5552)
              at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
              at android.view.View.measure(View.java:17624)
              at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5552)
              at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1438)
              at android.widget.LinearLayout.measureVertical(LinearLayout.java:724)
              at android.widget.LinearLayout.onMeasure(LinearLayout.java:615)

My top-level gradle file is as follows:

compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.code.gson:gson:2.7'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:palette-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.satsuware.lib:usefulviews:2.3.6'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.afollestad.material-dialogs:core:0.9.4.7'
compile 'com.afollestad.material-dialogs:commons:0.9.4.7'
apt 'com.jakewharton:butterknife-compiler:8.4.0'

The app itself didn’t give me any problems

Solution

Add your build.gradel code for more help, we can’t help you just with logs, but with all your code.

But I think the build tool version and SDK version must be the same
Like (25.X.X).

You can learn more: java.lang.NoSuchMethodError: No static method combineMeasuredStates(II)I in class

Related Problems and Solutions