Skip to content

Commit

Permalink
Additional note for release build (#214)
Browse files Browse the repository at this point in the history
If org.gradle.configureondemand=true is set for gradle, gradle will skip bundleJsAndAsset gradle task, which will result into the app crashing on startup with this in the logs:

java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a packager server

Since it is not clear from the error what is causing this, I would recommend adding this additional note to potentially save a lot of time for people figuring this out (it was not trivial to find the answer by googling).
  • Loading branch information
Juha Linnanen authored and charpeni committed Feb 26, 2018
1 parent 0442546 commit a861090
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/signed-apk-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ $ cd android && ./gradlew assembleRelease

Gradle's `assembleRelease` will bundle all the JavaScript needed to run your app into the APK. If you need to change the way the JavaScript bundle and/or drawable resources are bundled (e.g. if you changed the default file/folder names or the general structure of the project), have a look at `android/app/build.gradle` to see how you can update it to reflect these changes.

> Note: Make sure gradle.properties does not include *org.gradle.configureondemand=true* as that will make release build skip bundling JS and assets into the APK.
The generated APK can be found under `android/app/build/outputs/apk/app-release.apk`, and is ready to be distributed.

### Testing the release build of your app
Expand Down

0 comments on commit a861090

Please sign in to comment.