I am using this command :
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
OutputScanning folders for symlinks in C:\Users\mgaba\Desktop\InfraGBU\node_modules (86ms)
Scanning folders for symlinks in C:\Users\mgaba\Desktop\InfraGBU\node_modules (94ms)
Loading dependency graph, done.
bundle: Writing bundle output to: android/app/src/main/assets/index.android.bundle
bundle: Done writing bundle output
**Assets destination folder is not set, skipping...
**
Due to this i will not able to see images in apk. Images is not loading with this please help to remove this error.
Try This it worked for me
for android
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
EDIT
for ios
react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle --assets-dest ios
Thank you @kalpa
In your project directory, open terminal/command prompt and try below commands:
react-native bundle --assets-dest ./android/app/src/main/res/ --entry-file ./index.android.js --bundle-output ./android/app/src/main/assets/index.android.bundle --platform android --dev false
Then follow below commands:
cd android
./gradlew installRelease or ./gradlew assemblerelease
Please note that, if you have "index.android.js" file then use above commands as it is else replace it with "index.js" and use above commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With