【问题标题】:How to solve: Version: 7.8.0 is lower than the minimum version (9.0.0) required for google-services plugin如何解决:版本:7.8.0 低于 google-services 插件所需的最低版本(9.0.0)
【发布时间】:2019-03-30 09:07:49
【问题描述】:

我正在 Android Studio 上开发一个应用程序,但是当我尝试运行 Firebase FCM sdk 时, 我收到消息:版本:7.8.0 低于 google-services 插件所需的最低版本 (9.0.0)。

我该如何解决?

我的 build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "com.example.test"
        minSdkVersion 9
        targetSdkVersion 20
        versionCode 10096
        versionName "1.0.9.6"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    // Fixes "Duplicate files copied in APK" build bug
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
}
dependencies {

    // Pushy SDK
    implementation 'com.google.firebase:firebase-messaging:11.8.0'
    compile 'me.pushy:sdk:1.0.43'

    // AppCompat v7 Dependency
    compile 'com.android.support:appcompat-v7:23.4.0'

    // Google Play Services Dependencies
    compile 'com.google.android.gms:play-services-location:7.8.0'

    // All .jar files in ./libs
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

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

还有我的 build.gradle-master:

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

        classpath 'com.google.gms:google-services:3.1.1'
    }
}

allprojects {
    repositories {
        jcenter()
        google()
    }
}

感谢您的帮助。

【问题讨论】:

    标签: android firebase firebase-cloud-messaging google-play-services


    【解决方案1】:

    正如错误日志所说,您应该更改build.gradle中的版本。

        // Google Play Services Dependencies
        compile 'com.google.android.gms:play-services-location:9.0.0'
    

    【讨论】:

    • 消息:请通过更新 google-services 插件的版本(有关最新版本的信息可在 bintray.com/android/android-tools/… 获得)或更新 com.google.android 的版本来修复版本冲突。 gms 到 9.0.0。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-12-15
    • 1970-01-01
    • 2018-02-27
    • 2015-04-11
    • 2017-03-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多