android - 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'
}
解决方案
只要您使用在较低版本上运行的库,就无法升级到版本 27.1.0。在您的情况下,您只需“放弃”并选择版本 26.1.0(最低公分母)。一旦所有库都升级到 27.1.0,您就可以升级到版本 27.1.0。
请试试
implementation 'com.android.support:appcompat-v7:26.1.0'
推荐阅读
- flutter - Flutter 代码测试中的随机数错误
- oracle-apex - 甘特图 Oracle Apex
- docker - dcproj 项目的 docker COPY 命令出错
- javascript - 使用 React JS 和 Laravel 将带有图像文件的 POST 请求发送到数据库时出现内部服务器错误
- javascript - 无效的拖放区元素
- c++ - Visual Studio 中的 OpenCV 在运行一次后崩溃
- angular - Okta 身份验证登录
- regex - 如何在 Linux 中读取文件并获取某些行
- django - 在 docker 中为 django 和 postgres 设置 db_password
- reactjs - 使用 react formik 进行空间验证