首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >firebase中的重复类.通用和空白.具有BoM库版本的firebase组件

firebase中的重复类.通用和空白.具有BoM库版本的firebase组件
EN

Stack Overflow用户
提问于 2020-10-23 14:42:01
回答 1查看 1.5K关注 0票数 2

我在一起使用一些Firebase库,所以我使用BoM来确保库一起工作,这是我的等级。

代码语言:javascript
复制
implementation platform('com.google.firebase:firebase-bom:25.12.0')

implementation "com.google.firebase:firebase-messaging"
implementation "com.google.firebase:firebase-ml-vision"
implementation 'com.google.firebase:firebase-dynamic-links'
implementation 'com.google.firebase:firebase-config'
implementation 'com.google.firebase:firebase-installations'
implementation 'com.google.firebase:firebase-analytics'

不幸的是,我遇到了这样的错误:

模块中找到的重复类com.google.firebase.components.AbstractComponentContainer -

-公共-18.0.0-runtime.jar(com.google.Firebase:firebase- Duplicate :18.0.0)和jetified-firebase-components-16.0.0-runtime.jar (com.google.firebase:firebase-components:16.0.0)

我可以从gradle看到以下“依赖”帮助:

代码语言:javascript
复制
com.google.firebase:firebase-common:16.0.3 -> 18.0.0
com.google.firebase:firebase-common:19.3.0 -> 18.0.0

而这些依赖只存在于上面的implementation中。

com.google.firebase:firebase-components:16.0.0只在这里:

代码语言:javascript
复制
+--- com.google.firebase:firebase-config -> 19.2.0
|    ...
|    +--- com.google.firebase:firebase-installations:16.3.2
|    |    +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    +--- com.google.firebase:firebase-common:19.3.0 -> 18.0.0 (*)
|    |    +--- com.google.firebase:firebase-components:16.0.0

我觉得这个问题可能是由玩艺器引起的,但我不能肯定。

我尝试完全删除这两个库,但显然它们被使用了,因此在运行时会造成崩溃。

我知道使用bom可以保护我免受像这样的图书馆冲突..?所以我想知道我是不是错过了一些与版本无关的东西。

EN

回答 1

Stack Overflow用户

发布于 2022-09-15 14:44:45

  1. 将这些行添加到android > app > build.gradle中

实现'com.google.firebase:firebase-core:17.3.0‘

实现'com.google.firebase:firebase-messaging:20.1.5'

.gradlew clean >

  1. cd .> npm start -reset-cache

现在检查

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64502154

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档