React-native-share: Unable to get provider android.support.v4.content.FileProvider

Created on 22 Jan 2018  Â·  2Comments  Â·  Source: react-native-share/react-native-share

Android 8.0

Application of flash back
error is :
java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.IllegalArgumentException: Missing android.support.FILE_PROVIDER_PATHS meta-data

I am a step by step according to the document
what should i do ? :

Most helpful comment

and the filepaths like this:

<?xml version="1.0" encoding="utf-8"?>
<paths>
    <cache-path
        name="camera_photos"
        path="" />
</paths>

(spent hours with same problem.)

All 2 comments

You might be missing meta-data in your manifest file. Try adding this

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

and the filepaths like this:

<?xml version="1.0" encoding="utf-8"?>
<paths>
    <cache-path
        name="camera_photos"
        path="" />
</paths>

(spent hours with same problem.)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrHazimAli picture MrHazimAli  Â·  3Comments

kunalnagar picture kunalnagar  Â·  3Comments

ruimfernandes picture ruimfernandes  Â·  4Comments

macuna picture macuna  Â·  4Comments

desis123 picture desis123  Â·  3Comments