android studio失败的任务':app:processDebugGoogleServices' [英] android studio failed for task ':app:processDebugGoogleServices'

查看:240
本文介绍了android studio失败的任务':app:processDebugGoogleServices'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这是完整的错误:当我想建立我的项目时,弹出一个错误,它说:Exectuion失败的任务'app:processDebugGoogleServices'。

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

这些是我的gradle文件。

应用插件:'com.android.application'

android {
signingConfigs {

}
dexOptions {
javaMaxHeapSize2g
}
compileSdkVersion 25
buildToolsVersion '26 .0.2'
defaultConfig {
applicationIdorg.xx
minSdkVersion 15
targetSdkVersion 25
versionCode 2
versionName1.1
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
productFlavors {
}
}

依赖项{
**执行'com.google.android.gms:play-services-maps:11.6.0'**
编译fileTree(包括:['*。 jar'],dir:'libs')
编译'com.google.code.gson:gson:2.5'
编译'com.android.support:appcompat-v7:23.4.0'
编译'com.android.support: design:23.4.0'
compile'c​​om.android.support:support-v4:23.4.0'
compile'c​​om.loopj.android:android-async-http:1.4.9'
compile'c​​om.squareup.picasso:picasso:2.5.2'
compile'c​​om.google.firebase:firebase-auth:11.0.4'
compile'c​​om.google.firebase:firebase-消息:11.0.4'
编译'com.google.firebase:firebase-core:11.0.4'
编译'com.google.firebase:firebase-analytics:11.0.4'
compile'c​​om.google.android.gms:play-services-auth:11.6.0'
compile'c​​om.android.support.constraint:constraint-layout:+'
compile'c​​om.facebook。 android:facebook-android-sdk:[4,5]'
compile'c​​om.facebook.android:facebook-share:[4,5)'
compile'c​​om.ToxicBakery.viewpager.transforms:视图寻呼机变换:1.2.32@aar
compile'org.apache.commons:commons-lang3:3.4'
compile'c​​om.getbase:floatingactionbutton:1.9.0'
compile'c​​om.ms-square:expandableTextView:0.1。 4'
compile'c​​om.android.support:multidex:1.0.1'
testCompile'junit:junit:4.12'
}

apply plugin:'com .google.gms.google服务'

和其他gradle文件

  buildscript {
repositories {
jcenter()
maven {
url'https:// maven。 google.com/'
name'Google'
}
}
依赖关系{
classpath'com.android.tools.build:gradle:3.0.0'
classpath'com.google.gms:google-services:3.1.1'

//注意:不要在这里放置您的应用程序依赖关系;它们属于单个模块build.gradle文件中的
//
}
}

allprojects {
存储库{
jcenter()
mavenCentral()
google()
}
}

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

在第一个gradle中,实现'com.google.android.gms:play -services-maps:11.6.0'抛出一个错误消息:

 所有gms / firebase库必须使用完全相同的版本规范(混合版本可能会导致运行时崩溃)。发现版本11.6.0,11.0.4。示例包括com.google.android.gms:play-services-auth:11.6.0和com.google.firebase:firebase-analytics:11.0.4 

我做错了什么?

解决方案

我解决了这个问题。



只有你需要写的是同一种版本:

  'com.google.android.gms:play-services-maps:*** 11.6.0 **'* 

从GOOGLE和FIREBASE到其他图书馆


when i want to build my project, an error pops up and It says: Exectuion failed for task 'app:processDebugGoogleServices'.

This is the full 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 11.0.4.

These are my gradle files.

    apply plugin: 'com.android.application'

android {
    signingConfigs {

    }
    dexOptions {
        javaMaxHeapSize "2g"
    }
    compileSdkVersion 25
    buildToolsVersion '26.0.2'
    defaultConfig {
        applicationId "org.x.x"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 2
        versionName "1.1"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    **implementation 'com.google.android.gms:play-services-maps:11.6.0'**
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.google.code.gson:gson:2.5'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.loopj.android:android-async-http:1.4.9'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.google.firebase:firebase-auth:11.0.4'
    compile 'com.google.firebase:firebase-messaging:11.0.4'
    compile 'com.google.firebase:firebase-core:11.0.4'
    compile 'com.google.firebase:firebase-analytics:11.0.4'
    compile 'com.google.android.gms:play-services-auth:11.6.0'
    compile 'com.android.support.constraint:constraint-layout:+'
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.facebook.android:facebook-share:[4,5)'
    compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar'
    compile 'org.apache.commons:commons-lang3:3.4'
    compile 'com.getbase:floatingactionbutton:1.9.0'
    compile 'com.ms-square:expandableTextView:0.1.4'
    compile 'com.android.support:multidex:1.0.1'
    testCompile 'junit:junit:4.12'
}

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

and the other gradle file

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
        classpath 'com.google.gms:google-services:3.1.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        google()
    }
}

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

In the first gradle, implementation 'com.google.android.gms:play-services-maps:11.6.0' is throwing an error that says:

All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 11.6.0, 11.0.4. Examples include com.google.android.gms:play-services-auth:11.6.0 and com.google.firebase:firebase-analytics:11.0.4

What am I doing wrong?

解决方案

I RESOLVED THIS.

THE ONLY THING YOU NEED TO DO IS WRITE THE SAME VERSION OF:

implementation 'com.google.android.gms:play-services-maps:***11.6.0**'*

TO THE OTHERS LIBRARIES FROM GOOGLE AND FIREBASE

这篇关于android studio失败的任务':app:processDebugGoogleServices'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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