首页 > 解决方案 > Android Studio Firebase 依赖与 appcompat 不兼容

问题描述

我正在尝试将firebase-auth:15.0.0依赖项添加到我的项目中,appcompat-v7:27.0.0但它会导致警告“混合版本可能导致运行时崩溃”。我也尝试添加新的更新依赖项,firebase-auth:15.1.0但它会导致同样的问题。

这是我的依赖块

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.google.firebase:firebase-auth:15.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

标签: androidfirebasefirebaseui

解决方案


只要您使用在较低版本上运行的库,就无法升级到版本 27.1.0。在您的情况下,您只需“放弃”并选择版本 26.1.0(最低公分母)。一旦所有库都升级到 27.1.0,您就可以升级到版本 27.1.0。

请试试

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

推荐阅读