Skip to content

Android App Flavor

Plum Spirits edited this page Feb 14, 2019 · 20 revisions

For a demo we set up the android build system to compile app flavors.

Here the usage: In {projectRoot}/

Ensure all node dependencies are installed

  • yarn install

Clean (required)

  • yarn clean:android

Build and install flavored apk on connected phone or simulator

  • cd android && ./gradlew installR2bdemoDebug

Bundle app with haul and start development server.

  • yarn bundle:android
  • Eventually restart app manually after haul started.

Release flavored apk to {projectRoot}/app/build/outputs/apk/r2bdemo/release

  • cd android && ./gradlew assembleR2bdemo

Install release on a phone

  • adb install app-r2bdemo-release.apk

We also introduced a 'production' flavor used for our regular development. Its usage is reflected in package.json. If you switch back to flavor 'production' remember to yarn clean:android first.

Clone this wiki locally