Android: Deprecation warnings about SDCardDir and SDCardApplicationDir
See original GitHub issueBranch: 0.10.9
Just calling the following code:
import RNFetchBlob from 'react-native-fetch-blob';
const url = http://my.server.com/my/upload/API;
const headers = { Authorization: 'Bearer xxxxxxxxx' };
const body = RNFetchBlob.wrap('file:///storage/emulated/0/Android/data/some/local/file');
const res = await RNFetchBlob.fetch('POST', url, headers, body);
generates the following warnings in the Android logs:
W ReactNativeJS: SDCardDir as a constant is deprecated and will be removed in feature release. Use RNFetchBlob.android.getSDCardDir():Promise instead.
W ReactNativeJS: SDCardApplicationDir as a constant is deprecated and will be removed in feature release. Use RNFetchBlob.android.getSDCardApplicationDir():Promise instead. This variable can be empty on error in native code.
These warnings have been added by https://github.com/joltup/react-native-fetch-blob/commit/22fd32a but apparently there are still some occurrences of SDCardDir
and SDCardApplicationDir
in the code of the 0.10.9 branch.
I’m aware that the 0.10.9 branch isn’t stable yet but it is intended to be released with a bunch of bug fixes so I believe that these warnings should be fixed before the release.
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
SDCardFS Deprecation - Android Open Source Project
SDCardFS is deprecated on devices that launch with Android 11 or higher and run kernel version 5.4 or higher. On such devices, VTS...
Read more >Deprecation warnings from generated sources not ...
In our Android project, targeting API 33 caused a lot of deprecation warnings. In particular, the generated code for navigation args are ...
Read more >The rn-fetch-blob from joltup - Coder Social
Grant Permission to External storage for Android 5.0 or lower ... Android: Deprecation warnings about SDCardDir and SDCardApplicationDir. Branch: 0.10.9.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue should be resolved by #77
You’re right, this getters are called when dirs object is instantiated just be importing fs.js file. Will think about it @ataillefer .