relez
relez

Reputation: 790

Error in Manifest merger - Nativescript 5.1

I am having this gradle error when I try to build my app. I have added the suggestion given by the CLI but its not working.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/provider_paths) from [:nativescript_camera:] AndroidManifest.xml:19:17-55
        is also present at [:MultiTypeFilePicker-release:] AndroidManifest.xml:46:17-51 value=(@xml/file_paths).
        Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.

Any help with this?

I am using NativeScript 5.1/Angular 7.

Thanks!

Upvotes: 1

Views: 242

Answers (1)

relez
relez

Reputation: 790

I have fixed this issue adding:

xmlns:tools="http://schemas.android.com/tools"

to the manifest header tag and then adding:

<provider android:name="android.support.v4.content.FileProvider" android:authorities="com.*.*.fileprovider" android:exported="false" android:grantUriPermissions="true" tools:replace="android:authorities">
    <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" tools:replace="android:resource" />
</provider>

inside the application tag.

Thanks!

Upvotes: 2

Related Questions