android.support.v4.content.FileProvider not found
As of AndroidX (the repackaged Android Support Library), the path is androidx.core.content.FileProvider
so the updated provider tag would be:
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
Android Support Libraries are now in the androidx.*
package hierarchy.
android.*
is now reserved to the built-in Android System Libraries.
Instead of
import android.support.v4.content.FileProvider;
Try importing
import androidx.core.content.FileProvider;
Using the following commands solved my issue:
npm install jetifier --save
npx jetify
npx cap sync
I replaced it with the newer version, which is : androidx.core.content.FileProvider
This worked for me.
add compile 'com.android.support:support-v4:26.1.0'
to build.gradle file in app module.