在 Android Studio 中为 FCM 实现 Firebase 依赖项时出错



我正在安卓工作室研究FCM。在实现火力依赖时,我遇到了一些错误。请解决我的问题。谢谢:)

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'

错误我像这样

错误:清单合并失败:属性 application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory( from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 也出现在 [androidx.core:core:1.0.0]安卓清单.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory(. 建议:添加 'tools:replace="android:appComponentFactory"' to element 在 AndroidManifest.xml:11:5-52:19 进行覆盖。

对我来说,更新版本号有效。在这里查看最新版本:https://firebase.google.com/support/release-notes/android

例如:

com.google.firebase:firebase-messaging:19.0.1