解决方法:版本:7.8.0低于谷歌服务插件所需的最低版本(9.0.0)



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

我该如何解决它?

My 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()
    }
}

谢谢你的帮助。

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

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

相关内容

  • 没有找到相关文章

最新更新