Firebase库实现的Appcompat错误 [英] Appcompat error with firebase library implementation

查看:67
本文介绍了Firebase库实现的Appcompat错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我对添加Firebase依赖项有一个小问题.当我在buil.gradle中添加以下行:implementation 'com.google.firebase: firebase-core: 17.0.0'时,在以下行中看到错误行:implementation 'com.android.support:appcompat -v7: 28.0.0.我搜索了但尚未找到解决方案.谢谢您的帮助.

Hello I had a little question about adding dependency for firebase. when I add this line: implementation 'com.google.firebase: firebase-core: 17.0.0' to my buil.gradle I see an error line at the line: implementation 'com.android.support:appcompat -v7: 28.0.0. I searched but not yet a solution. Thank you for helping me.

推荐答案

Firebase在最新版本中已迁移到AndroidX.因此,不再支持旧的支持库.您必须降级Firebase,

Firebase migrated to AndroidX in the latest release. So no more supports for the old support libraries. You have to either downgrade firebase,

implementation 'com.google.firebase:firebase-core:16.0.9'

或如下所述迁移您的应用以使用AndroidX.

or migrate your app to use AndroidX as mentioned below.

此版本是主要版本更新,其中包含重大更改. 在此版本中,库已从Android支持迁移 Jetpack(AndroidX)库的库.更新的库 除非您在应用中进行以下更改,否则它将无法正常工作:

This release is a MAJOR version update and includes breaking changes. With this release, libraries are migrated from the Android Support Libraries to the Jetpack (AndroidX) Libraries. The updated libraries will not work unless you make the following changes in your app:

将com.android.tools.build:gradle升级到v3.2.1或更高版本.

Upgrade com.android.tools.build:gradle to v3.2.1 or later.

将compileSdkVersion升级到28或更高版本.

Upgrade compileSdkVersion to 28 or later.

更新您的应用程序以使用Jetpack (AndroidX);请按照迁移到 AndroidX中的说明进行操作.

Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.

这篇关于Firebase库实现的Appcompat错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆