Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest merger failed with multiple errors #474

Open
jatin-bhuva opened this issue Aug 16, 2023 · 2 comments
Open

Manifest merger failed with multiple errors #474

jatin-bhuva opened this issue Aug 16, 2023 · 2 comments

Comments

@jatin-bhuva
Copy link

jatin-bhuva commented Aug 16, 2023

Since last Monday I am getting the below error while building the app from the Android studio:

/Users/macm/Desktop/mobile-app/android/app/src/debug/AndroidManifest.xml:15:13-72 Error:
Attribute provider#androidx.core.content.FileProvider@authorities value=(com.verygoodsecurity.vgsshow.provider) from [com.verygoodsecurity:vgsshow:1.2.0] AndroidManifest.xml:15:13-72
is also present at [io.intercom.android:intercom-sdk-base:15.1.6] AndroidManifest.xml:121:13-72 value=(com.today.development.IntercomFileProvider).
Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:13:9-21:20 to override.

/Users/macm/Desktop/mobile-app/android/app/src/debug/AndroidManifest.xml:44:17-55 Error:
    Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/file_paths) from [:react-native-blob-util] AndroidManifest.xml:44:17-55
    is also present at [io.intercom.android:intercom-sdk-base:15.1.6] AndroidManifest.xml:126:17-60 value=(@xml/intercom_file_paths).
    Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
Last Friday app was successfully built from android studio.

This is related to @intercom/intercom-react-native 5.1.1 library manifest file. Let me know if anyone have idea for this.

@jatin-bhuva jatin-bhuva changed the title React-Native Manifest merger failed with multiple errors Manifest merger failed with multiple errors Aug 16, 2023
@junocs
Copy link

junocs commented Aug 16, 2023

I've also run into this issue today. What I did was to add this to the AndroidManifest.xml file

<provider
    android:name="androidx.core.content.FileProvider"
    android:authorities="${applicationId}.FileProvider"
    android:exported="false"
    android:grantUriPermissions="true"
    tools:replace="android:authorities">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/merged_provider_paths"
        tools:replace="android:resource" />
</provider>

I also created the merged_provider_paths.xml file inside the xml folder to contain what is in the intercom_file_paths.xml and in the conflicted library. In your case, it should be inside @xml/file_paths.

Mine looks like this

<?xml version="1.0" encoding="utf-8"?>
<paths>
    <cache-path
        name="shared_images"
        path="images/" />
    <external-path name="external" path="." />
</paths>

@jatin-bhuva
Copy link
Author

jatin-bhuva commented Aug 16, 2023

@junocs Can you explain it a bit further?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants