gpt4 book ai didi

android - Gradle com.android.support和com.google.android.gms库冲突

转载 作者:行者123 更新时间:2023-12-03 05:11:52 24 4
gpt4 key购买 nike

我正在主项目中使用Firebase聊天应用程序,并将Firebase依赖项添加到了build.gradle中,但是同步后却收到了以下消息:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes.) Found versions 25.3.1, 25.0.0, 23.4.0. Examples include com.android.support:animated-vector-drawable:25.3.1 and com.android.support:palette-v7:25.0.0




compile 'com.android.support:appcompat-v7:25.3.1'



All com.google.android.gms libraries must use the exact same version specification (mixing versions can lead to runtime crashes.) Found versions 9.8.0, 10.2.6. Example include com.google.android.gms:play-services-auth-base:9.8.0 and com.google.android.gms:play-services-ads-lite:10.2.6




compile 'com.google.android.gms:play-services-ads:10.2.6'

这是我对 build.gradle (Module:app)的依赖:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('lib/mysql-connector-java-5.1.6.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-ads:10.2.6'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'


//Chat dependencies
compile 'com.android.support:design:25.3.1'
compile 'com.firebaseui:firebase-ui:0.6.2'
compile 'com.github.hani-momanii:SuperNova-Emoji:1.0'
}

最佳答案

根据您的build.gradle文件,
找到重复的代码行

compile 'com.android.support:design:25.3.1'

删除一个并尝试。

关于android - Gradle com.android.support和com.google.android.gms库冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44369637/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com