Firebase混合版本

时间:2018-07-03 10:11:11

标签: android firebase android-studio

我已将这些库添加到我的代码中

implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.2'

然后我发现该行有错误

  implementation 'com.android.support:appcompat-v7:27.0.2'

说存在混合版本问题

2 个答案:

答案 0 :(得分:0)

尝试添加所有相同版本的firebase api:

SelectedInventory

更改:

implementation 'com.google.firebase:firebase-auth:16.0.2'

也许应该有帮助。

答案 1 :(得分:0)

您的Firebase依赖项已更新,因此如果您不这样做,则首先更新您的构建工具版本:

buildToolsVersion '27.0.3'

将27.0.2替换为:

implementation 'com.android.support:appcompat-v7:27.1.1'

(还要确保每个库都已更新)based on this link for the latest varsion

确保您的gradle文件类似于:

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

buildscript {

    repositories {
        google()
        //..
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath 'com.google.gms:google-services:4.0.1'

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

allprojects {
    repositories {
        google()
        //..
    }
}
相关问题