首页 文章

谷歌播放服务插件版本冲突

提问于
浏览
0

我只需要将Firebase Messenger添加到我的项目中,现在我遇到了版本冲突 .

我添加了错误消息和gradle文件内容 .

我不知道哪个需要改变,但在开始添加之前 - 一切都很好 .

错误消息:“请通过更新google-services插件的版本(有关最新版本的信息可在https://bintray.com/android/android-tools/com.google.gms.google-services/获取)或将com.google.android.gms的版本更新为11.4.2来修复版本冲突 . ”

Gradle(构建)

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

buildscript {
    repositories {
        jcenter()
        google()
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.2.1'
        classpath 'io.fabric.tools:gradle:1.25.1'
        classpath 'com.google.firebase:firebase-plugins:1.1.5'

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

allprojects {
    repositories {
        jcenter()
        google()
        maven {
            url 'https://maven.google.com/'
        }
    }
}

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

摇篮(APP)

apply plugin: 'com.android.application'
    apply plugin: 'com.google.firebase.firebase-perf'
    apply plugin: 'io.fabric'
    apply plugin: 'com.google.gms.google-services'

    android {
        compileSdkVersion 26
        buildToolsVersion '27.0.3'

        defaultConfig {
            applicationId "XXXXXXXX"
            minSdkVersion 16
            targetSdkVersion 26
            versionCode 1
            versionName "1.0"
            vectorDrawables.useSupportLibrary = true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        implementation 'com.android.support:support-v4:26.1.0'
        implementation 'com.android.support:support-vector-drawable:26.1.0'
        implementation 'com.android.support.constraint:constraint-layout:1.1.0'
        implementation 'com.google.firebase:firebase-perf:11.8.0'
    //    implementation 'com.google.firebase:firebase-auth:11.8.0'

        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'

        compile 'com.android.support:appcompat-v7:26.1.0'
        compile 'com.android.support:design:26.1.0'
        compile 'com.google.firebase:firebase-core:11.8.0'
        compile 'com.google.firebase:firebase-database:11.8.0'
        compile 'com.firebaseui:firebase-ui:3.2.2'
        compile 'com.google.firebase:firebase-messaging:11.8.0'
        compile 'com.crashlytics.sdk.android:crashlytics:2.9.1'

        annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
    }

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

1 回答

相关问题