Error:Execution failed for task ':app:processDebugGoogleServices'. > Please fix the version conflict

来源:互联网 发布:linux find 子目录 编辑:程序博客网 时间:2024/06/11 19:06

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.

意思是:版本冲突或者版本太低,需要更新google服务插件,最新版本可在什么什么地方下载,或者更新版本

com.google.android.gms to 9.0.0.


解决方法:

1.检查应用级中,是否拥有以下内容,否则就添加。

classpath 'com.google.gms:google-services:3.0.0'
2.可能需要谷歌某种服务,项目级
dependencies {    classpath 'com.android.tools.build:gradle:2.0.0-alpha7'    classpath 'com.google.gms:google-services:2.0.0-alpha7'}

--

为什么下面的需要进行替换呢?

apply plugin:  dependencies {        classpath 'com.android.tools.build:gradle:2.2.3'        classpath 'com.google.gms:google-services:3.0.0'    }'
因为google它并不支持老款3.0.0的服务,得想办法去更换里面的方法。

3.应用级别,build.gradle中添加

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


现在你再执行,会发现问题已经解决,有一些部分人会出现另一种情况。


4.在开发google广告过程中,可能会缺少

dependencies {    // ...    compile 'com.google.firebase:firebase-core:9.6.1'}


正在写。。。请稍后






1 0