Rn-fetch-blob: RNFetchBlob.fs.mkdir fails after update targetSdkVersion 28 to 29 in Samsung Galaxy M31

Created on 5 Oct 2020  路  2Comments  路  Source: joltup/rn-fetch-blob

A few days earlier I got a mail from the play store that I need to change my targetSdkVersion 28 to 29 before 2 November 2020. When I changed this RNFetchBlob.fs.mkdir failed in Samsung Galaxy M31. If I run in another device it works good.
Please guide me on what breaks the code.

"rn-fetch-blob": "^0.12.0",
"react-native": "0.61.5",
"react": "16.9.0",

Most helpful comment

Here some steps for this issue.

  1. Change build version
    buildToolsVersion = '29.0.2'
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 29
    in android/build.gradle

  2. and than put

android:requestLegacyExternalStorage="true"
..........

in your AndroidManifest.xml file

  1. rebuild your project

Everything starts working perfectly.

All 2 comments

Where are you trying to mkdir?
Perhaps you need to opt out of scoped storage
https://developer.android.com/training/data-storage/use-cases#opt-out-scoped-storage

Here some steps for this issue.

  1. Change build version
    buildToolsVersion = '29.0.2'
    minSdkVersion = 21
    compileSdkVersion = 29
    targetSdkVersion = 29
    in android/build.gradle

  2. and than put

android:requestLegacyExternalStorage="true"
..........

in your AndroidManifest.xml file

  1. rebuild your project

Everything starts working perfectly.

Was this page helpful?
0 / 5 - 0 ratings