Home > Net >  React Native - gradle, manifest merge error
React Native - gradle, manifest merge error

Time:11-03

When trying to build my android react native app, im getting this error

Execution failed for task ':app:processReleaseMainManifest'.
> Manifest merger failed : Attribute meta-data#org.unimodules.core.AppLoader#react-native-headless@value value=(org.unimodules.adapters.react.apploader.RNHeadlessAppLoader) from [:unimodules-react-native-adapter] AndroidManifest.xml:14:13-88
        is also present at [:expo-modules-core] AndroidManifest.xml:14:13-86 value=(expo.modules.adapters.react.apploader.RNHeadlessAppLoader).
        Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:12:9-14:91 to override.

CodePudding user response:

For now I know that in my case it is that I have conflict between two manifest files in node_modules folder:

> cd <YOUR_PROJECT_DIR>/node_modules   
> grep -r -i RNHeadlessAppLoader | grep AndroidMan

./expo-modules-core/android/src/main/AndroidManifest.xml: 
android:value="expo.modules.adapters.react.apploader.RNHeadlessAppLoader" />
   
./@unimodules/react-native-adapter/android/src/main/AndroidManifest.xml:   
android:value="org.unimodules.adapters.react.apploader.RNHeadlessAppLoader"/>

CodePudding user response:

Updating to last expo SDK seems to be working for me (version 43). Since they replaced the react-native-unimodules package with an expo one.

  • Related