Last active
October 29, 2023 06:36
-
-
Save erikyuntantyo/d5ca92b19cb06aedb61c89324f6abc27 to your computer and use it in GitHub Desktop.
Build react-native offline bundling into android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create assets folder in the current project | |
$ mkdir android/app/src/main/assets | |
# create bundle script | |
$ 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/ | |
# execute command to run android to create debug apk | |
$ react-native run-android | |
# Or change to android folder | |
$ cd android | |
# build debug apk | |
$ ./gradlew assembleDebug | |
# build release/unsigned apk | |
$ ./gradlew assembleRelease |
Why index.android.bundle
?
I use main.jsbundle
@alonronin thank you
@zandercodes sorry, is there any issue?
Working fine!
Thanks Bro
Thanks a million !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
works perfectly