在com studio中更新com.google.firebase:firebase消息后出现错误

问题描述 投票:0回答:1

我在我的项目中使用com.google.firebase:firebase-messaging(版本:18.0.0'),但是如果将其更新为版本20.0.0,则会出现此错误-

ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:9:5-130:19 to override. 

并且如果我按照建议进行了对AndroidManifest的更改,则会收到此错误-

Error: tools:replace specified at line:9 for attribute android:appComponentFactory, but no new value specified
D:\BestmargProjects\MobileApplication\StudioProjects\Lovestar\app\src\main\AndroidManifest.xml Error:
    Validation failed, exiting

任何人都可以帮助我摆脱这个问题吗?

android android-studio firebase-cloud-messaging android-manifest
1个回答
0
投票

转到清单文件,然后单击“合并清单”以查看确切的错误。image

您可以迁移到AndroidX以防止此类错误。Migrating to AndroidX

© www.soinside.com 2019 - 2024. All rights reserved.