Skip to content Skip to sidebar Skip to footer

Missing Android.support.file_provider_paths Meta-data

I am trying to open the pdf file which I downloaded & saved in external storage. But When I open my app its gets crashed and showing following error; 08-31 00:58:31.304 1807-18

Solution 1:

In your AndroidManifest file, you have a slight typo in the metadata:

<meta-data
    android:name="android.support.FILE_PROVIDER_PATHS" <-- HERE!!!
    android:resource="@xml/provider_paths" />

You need to use FILE_PROVIDER_PATHS instead of FILE_PROVIDE_PATHS.

Solution 2:

Please do invalidate caches and restart function in android studio, most probably that will do.

After that rebuild and run your app. In my case it worked perfectly fine.

Solution 3:

Seems like something is set wrong, The compiler doesn't find android.support.FILE_PROVIDER_PATHS , thus, it throws this error, check if everything is set correctly in your gradle file, if you change the package of the android.support this exception might arise.

After fixing, do a clean, rebuild, or clean and invalidate cache in Android studio.

Solution 4:

this is often caused by a typo, where you might use android:value instead of android:resource in the meta-data tag specifying the file_paths.xml file. For example you might have:

android:value="@xml/file_paths"

instead of

android:resource="@xml/file_paths"

Solution 5:

Provider in AndroidManifest.xml, if you using AndroidX library.

<providerandroid:name="androidx.core.content.FileProvider"android:authorities="com.yourdomain.fileprovider"android:exported="false"android:grantUriPermissions="true"><meta-dataandroid:name="android.support.FILE_PROVIDER_PATHS"android:resource="@xml/file_paths" /></provider>

Post a Comment for "Missing Android.support.file_provider_paths Meta-data"