当前位置: 首页 > 知识库问答 >
问题:

如何修复错误:任务“: app: process DebugGoogleServices”执行失败

丌官子安
2023-03-14

如何修复

Error:Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'com.talada.myapplication'

我改变'com.google.android.gms: play-services-gcm: 8.4.0'到'com.google.android.gms: play-services-gcm: 8.3.0'和分布Url=https://services.gradle.org/distributions/gradle-2.12-all.zip分布Url=https://services.gradle.org/distributions/gradle-2.10-all.zip

不起作用。

build.gradle(应用程序)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

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

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'

    compile 'com.google.android.gms:play-services-gcm:8.4.0'
}
apply plugin: 'com.google.gms.google-services'

构建渐变(项目)

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


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

allprojects {
    repositories {
        jcenter()
    }
}

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

gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip

共有1个答案

东方骏
2023-03-14

编译

dependencies {
        compile 'com.google.android.gms:play-services:9.6.1'
}

并删除

apply plugin: 'com.google.gms.google-services'
 类似资料: