简体   繁体   English

React Native Android:清单合并失败

[英]React Native Android: Manifest merger failed

When I am running the command react-native run-android in the terminal (React-Native), I am getting the below-mentioned error.当我在终端 (React-Native) 中运行命令 react-native run-android 时,出现以下错误。

Manifest merger failed : Attribute application@appComponentFactory value=(andr清单合并失败:属性 application@appComponentFactory value=(andr
oid.support.v4.app.CoreComponentFactory) from [com.android.support:support-compa oid.support.v4.app.CoreComponentFactory) 来自 [com.android.support:support-compa
t:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.1.0-alpha05] AndroidManifest.xm t:28.0.0] AndroidManifest.xml:22:18-91 也出现在 [androidx.core:core:1.1.0-alpha05] AndroidManifest.xm
l:22:18-86 value=(androidx.core.app.CoreComponentFactory). l:22:18-86 值=(androidx.core.app.CoreComponentFactory)。

I tried migrating from android.support to android x as per the solution stated by few.我尝试按照少数人陈述的解决方案从 android.support 迁移到 android x。

Expected Result: Build SuccessFul预期结果:构建成功

Actual Result: BUILD FAILED in 9s实际结果:在 9 秒内构建失败

Can you try adding below in gradle.properties :您可以尝试在gradle.properties添加以下gradle.properties

android.useAndroidX=true
android.enableJetifier=true

It will automatically resolve dependency conflicts between google's files and third-party dependencies.它将自动解决 google 文件和第三方依赖项之间的依赖项冲突。

如果此选项不起作用,而不是立即升级到 android X,请参阅导入模块后清单合并失败

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM