0
votes

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 element at AndroidManifest.xml:11:5-60:19 to override.

This is after upgrading react-native version

build.gradle

android {
    compileSdkVersion 28

    defaultConfig {
        applicationId "com.rugbyvault"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 16
        versionName "1.0"
        multiDexEnabled true
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
}
dependencies {
    implementation project(':tipsi-stripe')
    implementation project(':react-native-splash-screen')
    implementation project(':react-native-linear-gradient')
    implementation project(':react-native-keep-awake')
    implementation project(':react-native-code-push')
    implementation project(':react-native-sound')
    implementation(project(':react-native-firebase')) {
        transitive = false
    }
    implementation project(':react-native-svg')
    implementation project(':instabug-reactnative')
    implementation project(':react-native-picker')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'com.android.support:multidex:1.0.3'
    //noinspection GradleCompatible
    implementation "com.android.support:appcompat-v7:28.0.0"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation "com.google.android.gms:play-services-base:17.0.0"
    implementation 'com.google.firebase:firebase-core:17.0.0'
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.android.gms:play-services-wallet:17.0.0'
    implementation 'com.google.firebase:firebase-messaging:17.0.0'
}
1
This may help you in troubleshooting your issue stackoverflow.com/a/56784046/4377954Deˣ

1 Answers

0
votes

It seems that latest version of react-native uses AndroidX libraries. So you need to upgrade your dependencies (in your case: appcompat and multidex) to AndroidX.

FYI: AndroidX (androidx.*) is new bundle of android support libraries (com.android.support.*).

You should replace this lines:

implementation 'com.android.support:multidex:1.0.3'
implementation "com.android.support:appcompat-v7:28.0.0"

With this ones:

implementation 'androidx.multidex:multidex::2.0.1'
implementation "androidx.appcompat:appcompat:1.0.2"


gradle.properties
android.enableJetifier=true
android.useAndroidX=true