android - 在 android studio 中为 FCM 实现 firebase 依赖项时出错
问题描述
我正在 android studio 中研究 FCM。在实现 firebase 依赖时,我遇到了一些错误。请解决我的问题。谢谢你 :)
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.android.gms:play-services-plus:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.android.gms:play-services-location:16.0.0'
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-messaging:9.2.0'
// implementation 'com.google.firebase:firebase-messaging:16.0.0'
implementation 'com.google.firebase:firebase-database:16.0.2'
我得到这样的错误
错误:清单合并失败:来自 [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 的属性 application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) 也是出现在 [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory)。建议:将 'tools:replace="android:appComponentFactory"' 添加到 AndroidManifest.xml:11:5-52:19 的元素以覆盖。
解决方案
对我来说更新版本号有效。在这里查看最新版本:https ://firebase.google.com/support/release-notes/android
例如:
com.google.firebase:firebase-messaging:19.0.1
推荐阅读
- c# - 无法在 C# 中调用扩展方法
- android - 错误:不能在类型转换器中使用未绑定的泛型
- c# - 无法更改 Windows 窗体中的窗体属性
- iso8583 - ISO 8583 授权消息说明
- sql - SQL MIN(COUNT) 似乎无法正常工作?
- hibernate - 在 SAP Hana 中插入时获取自动增量 ID
- emacs - Dired 忽略目录本地模式值
- shell - Jenkins 管道、外壳和管道
- ruby-on-rails - 如何使用带有 Mongoid 而不是 PostgreSQL 或 SQLite 的 Rails?
- python - libvirt-python CentOS 的构建轮子失败