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

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

问题描述


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




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

android {
compileSdkVersion 25
buildToolsVersion 25.0.1
defaultConfig {
applicationIdcom.julia.android.example_project
minSdkVersion 10
targetSdkVersion 25
versionCode 1
versionName1.0
}
buildTypes {
release {
minifyEnabled false
proguardFiles get DefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
buildTypes.each {
it.buildConfigField'String','API_KEY' ,myKey
}
}

依赖关系{
编译fileTree(dir:'libs',include:['* .jar'])
compile 'com.android.support:appcompat-v7:25.0.1'
...
compile'c​​om.google.android.gms:play-services:10.0.1'
compile' com.google.android.gms:play-services-gcm:10.0.1'
compile'c​​om.google.android.gms:play-services-location:10.0.1'
wearApp project(' :wear')
}





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

allprojects {
repositories {
jcenter()
}
}

任务清理(类型:删除){
delete rootProject.buildDir
}

我试着移动 apply plugin:'com.google .gms.google-services'位于我的应用/ build.gradle文件的底部,但没有成功。



任何想法,请吗?

解决方案

今天早些时候有这个问题。



更新以下行:

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

到:

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


I'm trying to build my new project, but I get this error:

Error:Execution failed for task ':mobile: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.

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

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"
    defaultConfig {
        applicationId "com.julia.android.example_project"
        minSdkVersion 10
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    buildTypes.each {
        it.buildConfigField 'String', 'API_KEY', myKey
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:25.0.1'
    ...
    compile 'com.google.android.gms:play-services:10.0.1'
    compile 'com.google.android.gms:play-services-gcm:10.0.1'
    compile 'com.google.android.gms:play-services-location:10.0.1'
    wearApp project(':wear')
}

And

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

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

I tried to move apply plugin: 'com.google.gms.google-services' at the bottom of my app/build.gradle file, but it didn't work out.

Any ideas, please?

解决方案

Had this issue earlier today. Just apply the google services plugin before you apply the android application plugin.

Update the following lines:

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

to:

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

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

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