我在构建gradle时遇到以下错误

时间:2018-01-03 07:21:25

标签: android

错误:任务':app:processDebugGoogleServices'执行失败。

  

请修改版本冲突,方法是更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms版本更新为11.8.0

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "in.lmcgroup.lmcgroup"
        minSdkVersion 16
        targetSdkVersion 27
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:25.3.1'

    compile 'com.google.firebase:firebase-core:11.8.0'
    compile 'com.google.firebase:firebase-auth:11.8.0'
    compile 'com.google.firebase:firebase-database:11.8.0'


    compile 'com.google.firebase:firebase-admin:5.7.0'

    compile 'com.firebaseui:firebase-ui-auth:3.1.0'

    compile 'com.android.support:support-v4:26.+'

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

1 个答案:

答案 0 :(得分:0)

您是否在app gradle中添加了classpath?

classpath 'com.google.gms:google-services:3.0.0'