Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phabreeze/9e749f5bd07599c2c15e2e5e7ec5d0c3 to your computer and use it in GitHub Desktop.
Save phabreeze/9e749f5bd07599c2c15e2e5e7ec5d0c3 to your computer and use it in GitHub Desktop.

Revisions

  1. @erikyuntantyo erikyuntantyo revised this gist Jan 9, 2018. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion react-native-offline-bundling-android
    Original file line number Diff line number Diff line change
    @@ -4,5 +4,14 @@ $ 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 build debuk.apk
    # 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
  2. @erikyuntantyo erikyuntantyo revised this gist Jan 9, 2018. No changes.
  3. @erikyuntantyo erikyuntantyo created this gist Jan 9, 2018.
    8 changes: 8 additions & 0 deletions react-native-offline-bundling-android
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # 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 build debuk.apk
    $ react-native run-android