版本冲突更新到播放服务9.4.0

时间:2016-09-29 10:50:35

标签: android

  Receive   Error

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

  

请修改版本冲突,方法是更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms版本更新为9.4.0。

In top level build gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:2.1.0'
        classpath 'com.google.gms:google-services:3.0.0'


    }
}

allprojects {
    repositories {
        jcenter()
        mavenLocal()
    }
}

In app level build gradle:

compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'

compile 'com.google.firebase:firebase-database:9.4.0'


  I have also include
  apply plugin: 'com.google.gms.google-services'
in the end of the build gradle file.

2 个答案:

答案 0 :(得分:0)

  

[...]将com.google.android.gms的版本更新为9.4.0。

喜欢那个?

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

答案 1 :(得分:0)

变化

compile 'com.google.android.gms:play-services-gcm:9.0.0'

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