gpt4 book ai didi

android - 我可以知道我需要使用gradle编译哪个依赖版本

转载 作者:行者123 更新时间:2023-12-03 06:08:24 29 4
gpt4 key购买 nike

我有下一个gradle文件:

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.google.gms:google-services:2.0.0-alpha3'


}
}


dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'

compile fileTree(dir: 'libs', include: ['*.jar'])

testCompile 'junit:junit:4.12'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'com.android.support:design:23.2.1'
compile 'com.loopj.android:android-async-http:1.4.4'

compile 'com.google.android.gms:play-services-base:8.4.0'
compile 'com.google.android.gms:play-services-location:7.3.0'

compile 'com.google.gms:google-services:2.1.0-rc1'

}

我在以 compile 'com.google.android.gms开头的行中出现错误

错误是:

Error:Execution failed for task ':app:processDebugGoogleServices'.

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 8.3.0.



我如何知道该特定组件有哪些版本?

最佳答案

您应该保持com.google.android.gms库的版本相同。如果要使用8.4.0版作为services.base,则应始终保持其他版本不变。因此,您还应该将services-location设置为相同的版本:

compile 'com.google.android.gms:play-services-base:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'

有关更多版本信息,请参见 Google Play Services

另外,这是一个类似的问题,也对常规Gradle设置很有帮助: Version conflict updating to 8.4.0

关于android - 我可以知道我需要使用gradle编译哪个依赖版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36816073/

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