Android Gradle支持库必须使用相同版本 [英] Android Gradle support libraries must use same version
问题描述
我已经查看了所有其他问题,并搜索了不可能的结果,但是我找不到使用正确依赖关系的方法.下面是我的应用Gradle构建文件:
I already looked at every other questions and googled the impossible but I cannot find a way to use correct dependencies. Below there is my app Gradle build file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha01'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
google()
}
android {
compileSdkVersion 27
推荐答案
嘿,只需从使用 appcompat 较旧版本并支持的库中排除 appcompat 依赖项库.如果您的项目中没有这些支持库,请包括它们.在您的问题中,braintreepayments
是使用较旧版本的卡片视图和 design 库的库之一.尝试将gradle依赖项更改为
Hey just exclude the appcompat dependencies from the libraries which are using an older version of appcompat and support libraries. If you don't have these support libraries in your project then include them. In your question, braintreepayments
is one of the libraries which using an older version of card view and design library. Try changing your gradle dependencies to
dependencies {
...
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation ('com.braintreepayments.api:drop-in:3.0.0'){
exclude group: 'com.android.support'
}
...
}
这篇关于Android Gradle支持库必须使用相同版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!