【问题标题】:Getting error while implementing firebase dependencies for FCM in android studio在 android studio 中为 FCM 实现 firebase 依赖项时出错
【发布时间】:2019-08-20 00:44:39
【问题描述】:

我正在 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'

我遇到这样的错误

错误:清单合并失败:属性 应用程序@appComponentFactory 值=(android.support.v4.app.CoreComponentFactory)来自 [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 也出现在 [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 值=(androidx.core.app.CoreComponentFactory)。建议:加 'tools:replace="android:appComponentFactory"' 到元素 在 AndroidManifest.xml:11:5-52:19 处覆盖。

【问题讨论】:

    标签: android firebase dependencies firebase-cloud-messaging access-token


    【解决方案1】:

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

    例如:

    com.google.firebase:firebase-messaging:19.0.1
    

    【讨论】:

      猜你喜欢
      • 2021-02-17
      • 2015-09-23
      • 2020-12-08
      • 2016-02-19
      • 2019-04-04
      • 2018-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多