Gradle混合版本27.1.1和26.1.0 [Android Studio] [英] Gradle mixing versions 27.1.1 and 26.1.0 [Android Studio]

查看:63
本文介绍了Gradle混合版本27.1.1和26.1.0 [Android Studio]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于build.gradle配置,一切正常.

For the build.gradle configuration, everything is ok.

compileSdkVersion 26
defaultConfig {
    applicationId "com.my.app"
    minSdkVersion 16
    targetSdkVersion 26
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

dependencies {
implementation project(':market_licensing')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:design:26.1.0'
implementation "com.android.support:appcompat-v7:26.1.0"
}

当我迁移到版本27时,

When I migrate to version 27,

compileSdkVersion 27
defaultConfig {
    applicationId "com.my.app"
    minSdkVersion 16
    targetSdkVersion 27
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

dependencies {
implementation project(':market_licensing')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:design:27.1.1'
implementation "com.android.support:appcompat-v7:27.1.1"
}  

我有一个错误:

所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃).成立版本27.1.1、26.1.0.

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 26.1.0.

为什么我仍与旧版本26.1.0发生冲突?我很干净.

Why am I still showing a conflict with the old version 26.1.0? I do clean.

推荐答案

customtabs 需要在版本 27.1.1 ...

customtabs need to be provided in version 27.1.1 ...

implementation "com.android.support:customtabs:27.1.1"
implementation ("com.google.android.gms:play-services-ads:17.1.2") {
    exclude group: "com.android.support", module: "customtabs"
}

这篇关于Gradle混合版本27.1.1和26.1.0 [Android Studio]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆