Skip to Content
Platform GuidesAndroid Builds

Android Builds

This guide covers building NativeScript apps for Android devices and Google Play.

Package Types

TypeFlagUse Case
AAB--aabGoogle Play (default for release)
APK--apkDirect distribution, testing

AAB (Android App Bundle)

Default for release builds. Required for Google Play:

norrix build android release # or explicitly norrix build android release --aab

Benefits:

  • Smaller download size
  • Optimized for each device
  • Required for new Play Store apps

APK

For direct distribution or testing:

norrix build android release --apk

Use cases:

  • Beta testing outside Play Store
  • Enterprise distribution
  • Development testing

Keystore Configuration

For release builds, you need a signing keystore.

Create a Keystore

keytool -genkey -v \ -keystore release.keystore \ -alias my-app-key \ -keyalg RSA \ -keysize 2048 \ -validity 10000

Provide via CLI

norrix build android release \ --keystore ./signing/release.keystore \ --keystore-password $KEYSTORE_PASSWORD \ --key-alias my-app-key \ --key-password $KEY_PASSWORD

Provide via Config

// norrix.config.ts import { defineConfig } from '@norrix/cli'; export default defineConfig({ android: { keystorePath: './signing/release.keystore', keyAlias: 'my-app-key', }, });

Note: Store passwords in environment variables or Norrix secrets, not in version control.


Environment Variables

Store keystore passwords securely:

# Set as Norrix secrets norrix env set KEYSTORE_PASSWORD mysecretpassword norrix env set KEY_PASSWORD mykeypassword

These are injected at build time.


Build Artifacts

Successful Android builds produce:

ArtifactDescription
.aabAndroid App Bundle for Play Store
.apkAndroid Package (when using --apk)
mapping.txtProGuard mapping for crash reporting

Artifacts are uploaded to S3 and available in the dashboard.


Debug Builds

For development and debugging:

norrix build android debug

Debug builds:

  • Use debug signing
  • Enable debugging features
  • Include debug symbols
  • Faster build times

Version and Build Number

Specify Version

norrix build android release --version 1.2.0

Sets versionName in the manifest.

Specify Build Number

norrix build android release --build-number 42

Sets versionCode in the manifest.

Auto-Increment

If --build-number is omitted, Norrix automatically increments based on previous builds.


Play Store Submission

After building, submit to Play Store:

# Submit to production norrix submit android production # Submit to beta track norrix submit android beta # Submit to internal testing norrix submit android internal

Troubleshooting

Signing Failed

  • Verify keystore path is correct
  • Check key alias exists in keystore
  • Ensure passwords are correct
  • Confirm keystore isn’t corrupted

AAB Not Accepted

  • Check minimum SDK version
  • Verify app bundle format
  • Ensure signing is valid

Version Code Issues

  • Version code must be higher than previous release
  • Use --build-number to set explicitly
  • Each track can have different version requirements

ProGuard Issues

  • Check proguard-rules.pro for custom rules
  • Add keep rules for reflection-based code
  • Review mapping.txt for obfuscation issues