Android依赖项'com.android.support:support-core-utils'对于编译(27.1.1)和运行时(28.0.0)具有不同的版本

时间:2018-11-03 06:22:36

标签: android gradle

Android dependency 'com.android.support:support-core-utils' has different version for the compile (27.1.1) and runtime (28.0.0) classpath. You should manually set the same version via DependencyResolution

在构建我的android应用时遇到此错误

1 个答案:

答案 0 :(得分:0)

在您的项目 build.gradle文件中,最后添加以下内容:

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "28.0.0"
            }
        }
    }
}
相关问题