Skip to content Skip to sidebar Skip to footer

Androidmanifest Merge Error Using Fileprovider

I'm trying to use a library that has this in its AndroidManifest.xml: Copy

and in your manifest file you change it to:

<providerandroid:name=".MyFileProvider"... >

Solution 2:

Add to your AndroidManifest.xml file, inside the application tag:

<providerandroid:name="android.support.v4.content.FileProvider"android:authorities="${applicationId}.fileprovider"android:exported="false"android:grantUriPermissions="true"tools:replace="android:authorities"><meta-dataandroid:name="android.support.FILE_PROVIDER_PATHS"android:resource="@xml/file_paths"tools:replace="android:resource" /></provider>

Solution 3:

For those using sdk 28 and up, if you are migrating to androidx, solution is :

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

Solution 4:

Since you do not change any of the values in the provider, you do not need to include it in your manifest. Just remove those lines.

Post a Comment for "Androidmanifest Merge Error Using Fileprovider"