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.
3
Answers
Updating to last expo SDK seems to be working for me (version 43). Since they replaced the
react-native-unimodules
package with anexpo
one.For now I know that in my case it is that I have conflict between two manifest files in node_modules folder:
Solution
xmlns:tools="http://schemas.android.com/tools"
attribute to<manifest>
tag in<YOUR_PROJECT_DIR>/android/app/src/main/AndroidManifest.xml
application
section of your manifest fileI have this issue when I updated from expo 42 to expo 43(I already ejected but still using some of the expo modules)
I uninstall
react-native-unimodules
and backup my android folderthen I run
expo prebuild
(it ended with some error but in the end, it works fine)it will generate new android folder, then I slowly compare it with old android folder and add back whatever I need
and finally, I managed to get it running
expo 43 seems faster than expo 42, so I think it is worth the problem