Skip to content Skip to sidebar Skip to footer

Even I'm Using Menuitemcompat.setonactionexpandlistener My App Crashes With Advise To Use Menuitemcompat.setonactionexpandlistener

Today Android Studio (set to Stable channel updates) has offered me to download an update to Android Support Repository 46.0.0, so I did it. Then suddenly our app has started to cr

Solution 1:

It is just a bug in the 26.0.0-alpha1 release. Switch back to 25.3.0 by updating your build.gradle file.

Solution 2:

UPDATE 23.3.2017: Based on comments and further research the right way is really to force gradle to use explicit version when Gradle dependency resolution makes you to use any other version than desired.

Thanks to @Eugen and @ianhanniballake you can use following steps to decide if any action is needed and force the explicit version.

  1. Run gradlew androidDependencies to check which versions are resolved and used by Gradle
  2. If it does not match your required explicit version, force it as stated by @Eugen on this topic - https://stackoverflow.com/a/42957234/816216 (snippet posted below)

_

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '25.3.0'
            }
        }
    }
}

Post a Comment for "Even I'm Using Menuitemcompat.setonactionexpandlistener My App Crashes With Advise To Use Menuitemcompat.setonactionexpandlistener"