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

错误:执行任务“:app:processDebugGoogleServices”失败。Android

岳嘉良
2023-03-14

错误:任务': app: process DebugGoogleServices'执行失败。请通过更新google-services插件的版本(有关最新版本的信息可在https://bintray.com/android/android-tools/com.google.gms.google-services/获得)或更新com.google.android.gms的版本来解决版本冲突。

这是我得到的错误。下面是我的毕业档案。我已经尝试了stackoverflow的许多解决方案,但没有一个对我有效。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.radioaudio.motivationalaudios"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile files('libs/YouTubeAndroidPlayerApi.jar')
    compile 'com.google.android.gms:play-services:9.0.2'
    compile 'com.google.firebase:firebase-ads:9.0.2'
    compile 'com.google.firebase:firebase-core:9.0.2'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:multidex:1.0.1'

    compile 'com.onesignal:OneSignal:2.+@aar'
    compile 'com.google.android.gms:play-services-gcm:+'
    compile 'com.google.android.gms:play-services-analytics:+'
    compile 'com.google.android.gms:play-services-location:+'
}
apply plugin: 'com.google.gms.google-services'

共有1个答案

席银龙
2023-03-14

用编译

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

并删除

compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services-analytics:+'
compile 'com.google.android.gms:play-services-location:+'

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

应该可以的

 类似资料: