Google Play Services GCM 9.2.0要求“更新”回到9.0.0 [英] Google Play Services GCM 9.2.0 asks to "update" back to 9.0.0

查看:347
本文介绍了Google Play Services GCM 9.2.0要求“更新”回到9.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以今天早上我开始更新到我的项目库的最新版本。



我试图将GCM更新到最新版本9.2.0,但是我得到这个错误:


错误:任务':app:processDebugGoogleServices'的执行失败。
请通过更新google-services插件的版本来修复版本冲突(有关最新版本的信息,请参阅 https://bintray.com/android/android-tools/com.google.gms.google-services/ )或更新com.google.android的版本。 gms to 9.0.0。


这就是我的代码:

 依赖关系{
classpath'com.android.tools.build:gradle:2.1.2'
classpath'com.google.gms:google-services:3.0 .0'
classpath'com.neenbedankt.gradle.plugins:android-apt:1.8'
}

然后:

 依赖关系{
...

编译com.google.android.gms:play-services-gcm:9.2.0

...
}

任何人遇到同样的问题/解决同一问题?



谢谢。



编辑



显然,您必须在应用/构建的底部应用您的GSM插件。 gradle文件。否则,版本9.2.0将导致项目冲突。



作为参考,这是我的app / build.gradle文件现在的样子:

  apply plugin:com.android.application
apply plugin:com.neenbedankt.android-apt

android {
...
}

依赖关系{
...

// Google Cloud Messaging
编译com.google.android.gms:play-services-gcm:9.2.0

...
}

apply plugin:com .google.gms.google-services


解决方案

你有行

  apply plugin:'com.google.gms.google-services'

在应用程序的build.gradle文件的底部行吗?



当它出现在顶部,并且在此处时出现错误时,它应该在底部。


So this morning I started updating to the latest version of my project libraries.

I'm trying to update GCM to the latest version 9.2.0, but I get this error:

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 9.0.0.

This is how I have my code:

dependencies {
    classpath 'com.android.tools.build:gradle:2.1.2'
    classpath 'com.google.gms:google-services:3.0.0'
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}

And then:

dependencies {
    ...

    compile "com.google.android.gms:play-services-gcm:9.2.0"

    ...
}

Anyone having the same issue/fixed the same issue?

Thanks.

EDIT

Apparently you have to apply your GSM plugin at the bottom of your app/build.gradle file. Else, version 9.2.0 will cause conflict in your project.

For reference, this is how my app/build.gradle file looks like now:

apply plugin: "com.android.application"
apply plugin: "com.neenbedankt.android-apt"

android {
    ...
}

dependencies {
    ...

    // Google Cloud Messaging
    compile "com.google.android.gms:play-services-gcm:9.2.0"

    ...
}

apply plugin: "com.google.gms.google-services"

解决方案

Do you have the line

apply plugin: 'com.google.gms.google-services' 

line at the bottom of your app's build.gradle file?

I saw some errors when it was on the top and as it's written here, it should be at the bottom.

这篇关于Google Play Services GCM 9.2.0要求“更新”回到9.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆