简体   繁体   中英

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.

Manifest merger failed : Attribute application@appComponentFactory value=(andr
oid.support.v4.app.CoreComponentFactory) from [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
l:22:18-86 value=(androidx.core.app.CoreComponentFactory).

I tried migrating from android.support to android x as per the solution stated by few.

Expected Result: Build SuccessFul

Actual Result: BUILD FAILED in 9s

Can you try adding below in gradle.properties :

android.useAndroidX=true
android.enableJetifier=true

It will automatically resolve dependency conflicts between google's files and third-party dependencies.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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