所有com.google.android.gms库必须使用完全相同的版本

时间:2017-04-20 17:32:21

标签: android android-studio android-gradle

我已经将compileSdkVersion从23更新到24.之后,它给了我一个com.google.android.gms的错误。当我检查库时,只有一个com.google.android.gms是8.3.0版本(测量)。

enter image description here

我无法强制更新测量值

compile 'com.google.android.gms:play-services-measurement:9.4.0'

出现以下错误;

  

无法解决:   com.google.android.gms:播放服务测量:9.4.0

我已经检查了其他stackoverflow问题,但他们无法解决我的问题。 我该如何解决这个错误?

以下是我的依赖项;

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile('com.google.api-client:google-api-client-android:1.20.0') {
    exclude group: 'org.apache.httpcomponents'
}

compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:24.2.0'

compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.google.android.gms:play-services-analytics:9.4.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'
compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.github.npanigrahy:Custom-Calendar-View:v1.0'
compile 'com.android.support:support-v4:24.2.0'
compile 'com.wonderpush:wonderpush-android-sdk:1.2.3.2'
compile 'com.android.support:design:24.2.0'
compile 'org.mod4j.org.apache.commons:lang:2.1.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
    transitive = true;
}
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile project(':circleimageview-release')

}

完整错误文字:

  

错误:任务':app:processDebugGoogleServices'执行失败。

     
    

请通过更新google-services插件的版本来修复版本冲突(有关最新版本的信息是     可在     https://bintray.com/android/android-tools/com.google.gms.google-services/)     或将com.google.android.gms的版本更新为8.3.0。

  

1 个答案:

答案 0 :(得分:0)

我找到了解决问题的方法。我从

更新了我的gradle的项目级别
classpath 'com.google.gms:google-services:1.5.0-beta2'

classpath 'com.google.gms:google-services:3.0.0'
相关问题