All com.android.support libraries must use the exact same version specification

前端 未结 30 2197
忘掉有多难
忘掉有多难 2020-11-21 05:10

After updating to android studio 2.3 I got this error message. I know it\'s just a hint as the app run normally but it\'s really strange.

All com.andr

30条回答
  •  面向向阳花
    2020-11-21 05:54

    Another way to solve conflicts is just to force the correct version for all dependencies like this:

    dependencies {
                configurations.all {
                    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                        if (details.requested.group == 'com.android.support' && details.requested.name == 'support-v4') {
                            details.useVersion "27.0.2"
                        }
                    }
        ...
        }
    

    https://docs.gradle.org/current/userguide/customizing_dependency_resolution_behavior.html

提交回复
热议问题