joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.81k stars 772 forks source link

RNFetchBlob.fs.mkdir fails after update targetSdkVersion 28 to 29 in Samsung Galaxy M31 #680

Closed wtRahul closed 3 years ago

wtRahul commented 3 years ago

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",

ahmed-ismail-nt commented 3 years ago

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

wtRahul commented 3 years ago

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

<application android:requestLegacyExternalStorage="true" ..........

in your AndroidManifest.xml file

  1. rebuild your project

Everything starts working perfectly.