skip to Main Content

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


  1. Chosen as BEST ANSWER

    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.


  2. 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"/>
    

    Solution

    • Add such xmlns:tools="http://schemas.android.com/tools" attribute to <manifest> tag in <YOUR_PROJECT_DIR>/android/app/src/main/AndroidManifest.xml
    • Add such tag in application section of your manifest file
    <meta-data
    tools:replace="android:value" 
    android:name="org.unimodules.core.AppLoader#react-native-headless"
    android:value="org.unimodules.adapters.react.apploader.RNHeadlessAppLoader"/>
    
    Login or Signup to reply.
  3. I 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 folder

    then 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search