I have a folder of Images in my project
I'm struggling to access an image like this ProjectRoot/App/Images/image.png
in iOS I can access it by using:
RNFetchBlob.fs.dirs.MainBundleDir + 'assets/App/Images/image.png'
What would be the Android way? I've tried DocumentDir
and MainBundleDir
, I've only had a "file doesn't exist" returned
I have tried RNFetchBlob.fs.asset('image.png')
and RNFetchBlob.fs.asset('path/to/image.png')
and haven't been successful
I've logged out all the files and directories that I have access to and unfortunately I cannot find it
Need some help.
It is suggested that you can add
aaptOptions, noCompress to prevent assets in the Android assets folder from compressing into the bundle, however they exit outside of the Android project folder structure
"react-native": "0.49.1", "react-native-fetch-blob": "0.10.8",
Android: buildToolsVersion "23.0.1" targetSdkVersion 23
copyFile
orappendFile
with that? Or do you need to useRNFetchBlob.wrap(RNFetchBlob.fs.asset('my-asset.png')))
? Or how does that work? – Desiraedesire