Error:

任务":app:ProcessDebuggGoogleServices"的执行失败.请

我已经做了我找到的所有事情.

  dependencies {
            // This does not break the build when Android Studio is missing the JRebel for Android plugin.
            classpath 'com.zeroturnaround.jrebel.android:jr-android-gradle:1.0.+'
            classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
            classpath 'com.google.gms:google-services:2.0.0-alpha3'

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

在应用程序gradle中

    compile 'com.google.android.gms:play-services:8.4.0'

推荐答案

将这些依赖项用于项目构建.格拉德尔

dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
    classpath 'com.google.gms:google-services:2.0.0-alpha3'
}

并将其放在应用程序级构建的末尾.gradle文件(在依赖项之后).

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

我不知道为什么把这个放在末尾(而不是在开头)可以解决这个错误.

EDIT 5/1/2016

好的…所以我想结束你们在我的解决方案中遇到的所有问题

这是我最后一个应用程序级别的Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "your-app-name"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    jcenter()
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.android.support:design:23.1.1'
    compile 'com.mcxiaoke.volley:library:1.0.6@aar'
}

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

这是我的最后一个项目级别gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

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

allprojects {
    repositories {
        jcenter()
    }
}

将其与您自己的gradle文件进行比较,并添加或修改与我所写内容不同的任何值.

Android相关问答推荐

使用kotlin kotlinx序列化与generic

如何使用DeliveromManager.placeCall()删除已拨打的呼叫?

编写Inbox需要具有匹配兼容性的Kotlin版本

图像在Android Studio中显示,但不在设备中显示

如何检测HitTest是否命中给定的网格对象?

Yarn 机器人导致活动未找到,但Gradlew Run工作正常

如何使可拖动内容停留在可组合框的边界内

如何在使用带有底部导航组件的片段管理器时更改片段工具栏的标签

在Android中使用Room从SQlite数据库中获取实体列表的正确方式是什么?

Android Studio SQLite 错误:列不正确(没有这样的列:_id)

Material 3的MaterialSwitch默认大小太大了?如何使它变小?

如何删除 Jetpack Compose 中按钮的左边框?

具有管理员权限的 Kotlin 中的多用户系统

通知使用默认语言,屏幕显示多种语言,同时通过 AppCompatDelegate 设置应用程序语言

系统导航栏在某些场景下应用了深色效果

从活动共享视图模型以使用 hilt 组合函数

如何在jetpack compose中通过lamda返回columnScope/RowScope

Jetpack Compose Alignment - 误解了 alignBy 修饰符

删除项目时延迟列不更新

在 Room 中创建一对多关系时,@Relation 类是什么意思?