Skip to content

Instantly share code, notes, and snippets.

@RahulJyala7
Last active May 13, 2019 12:50
Show Gist options
  • Save RahulJyala7/70c32dbc6709fc6cc66e46c5320207c1 to your computer and use it in GitHub Desktop.
Save RahulJyala7/70c32dbc6709fc6cc66e46c5320207c1 to your computer and use it in GitHub Desktop.
React Native offline build
#React-Native 0.49.0+
react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
#if not work
https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows
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
#React-Native 0-0.49.0
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
---------------- IMP--------------------------------------
$ cd android
#Create debug build:
$ ./gradlew assembleDebug
#Create release build:
$ ./gradlew assembleRelease #Generated `apk`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment