2

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

Arpit Aggarwal
  • 27,626
  • 16
  • 90
  • 108

2 Answers2

1

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.

Arpit Aggarwal
  • 27,626
  • 16
  • 90
  • 108
0

see Manifest merger failed after import a module if this option doesnt work rather than upgrading to android X now.

mike james
  • 8,840
  • 3
  • 18
  • 21