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

标签 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应用程式时发生这个错误

最佳答案

在您的项目 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"
            }
        }
    }
}

关于android - Android依赖项 'com.android.support:support-core-utils'对于编译(27.1.1)和运行时(28.0.0)具有不同的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53128957/

相关文章:

c# - 如何在 C# 中创建 JSONArray 并将该数据发送到 Android 应用程序

Android - 在 calendarView 中按小时显示事件?

android - 在 Eclipse 中调试 Android 应用程序时,无法在匿名类中看到最终变量内容

php - Android 应用找不到 cPanel 文件 URL

intellij-idea - 在IDEA中似乎没有gradle导入支持

用于依赖项的 Gradle 私有(private)存储库

android - 无法在Android Studio中编译构建文件

Android 应用名称取决于 buildType 和 flavors Gradle

php - 如何获取Android应用程序的值

android - Gradle同步的Android Studio构建配置问题