user6632504
user6632504

Reputation:

Packaging an apk with js bundle included in dev mode in React Native Android

Is it possible to create a signed apk with js bundle included (not requiring development server) in dev mode, not release mode in React Native Android?

Upvotes: 2

Views: 820

Answers (1)

Konstantin Kuznetsov
Konstantin Kuznetsov

Reputation: 903

In your project's android/app/build.gradle insert

project.ext.react = [
  // supply additional arguments to the packager
  extraPackagerArgs: ["--dev", "true"]
]

before apply from: "../../node_modules/react-native/react.gradle"

This will force packager to run in dev mode when you execute assembleRelease task

There are more options in build.gradle, you can read comments inside the file.

Upvotes: 2

Related Questions