Rn-fetch-blob: Unable to get provider com.RNFetchBlob.Utils.FileProvider: java.lang.ClassNotFoundException: Didn't find class "com.RNFetchBlob.Utils.FileProvider"

Created on 16 Jul 2019  路  4Comments  路  Source: joltup/rn-fetch-blob

Hi, I'm trying to build the android project that react native generates in Android Studio but after build successfully the project and run it in a virtual device, the application stops at the moment when is launched and I got this in the terminal.

Screen Shot 2019-07-16 at 12 22 23

My currently environment

react-native: 59.9
rn-fetch-blob: 0.10.15

:(

Most helpful comment

npm install --save [email protected]

solved my problem

All 4 comments

you need to renamed android.support.v4.content.FileProvider to androidx.core.content.FileProvider and android.support.annotation.Nullable to androidx.annotation.Nullable in every file that import them
then use patch-package to make a patch file (read the documentation from this library, is easy), also you need to put in your android/gradle.properties file the following lines

android.useAndroidX=true
android.enableJetifier=true

and you are done

Check your package-lock.json file. In my case there was 0.10.16 of rn-fetch-blob instead of 0.10.15 for some reason, lol.

It's works dude, thanks for you time and as you said, the package-lock.json had the version 0.10.16 :O

npm install --save [email protected]

solved my problem

Was this page helpful?
0 / 5 - 0 ratings