Help prepare for 2025 → Answer 8 simple questions on our Fall Survey
Open Survey

Publishing a NativeScript is generally the same as publishing any other Android app, documented in the Official Android Docs

Prerequisites

Before following this guide, make sure you have a valid Google Play developer account.

  1. Set your application id
  2. Set your application Name
  3. Change your launcher icons
  4. Change your launch screen

Generating an upload keystore

To upload .apk or .aab files to Google Play, you must first sign them with an upload key. To be able to sign, you need to generate a keystore if you don't already have one. Follow the Android docs to generate a new keystore for your app.

Building an .aab (or .apk)

The following commands will build your app in release mode, and copy the result to the dist/ folder since we are passing in the --copy-to flag.

cli
ns build android --release \
  --key-store-path <path-to-your-keystore> \
  --key-store-password <your-key-store-password> \
  --key-store-alias <your-alias-name> \
  --key-store-alias-password <your-alias-password> \
  --aab \
  --copy-to dist/build.aab
cli
ns build android --release \
  --key-store-path <path-to-your-keystore> \
  --key-store-password <your-key-store-password> \
  --key-store-alias <your-alias-name> \
  --key-store-alias-password <your-alias-password> \
  --apk \
  --copy-to dist/build.apk
cli
ns build android --release \
  --key-store-path C:\projects\app\upload.keystore \
  --key-store-password example_password \
  --key-store-alias upload \
  --key-store-alias-password example_password \
  --aab \
  --copy-to dist\build.aab
cli
ns build android --release \
  --key-store-path ~/projects/app/upload.keystore \
  --key-store-password example_password \
  --key-store-alias upload \
  --key-store-alias-password example_password \
  --aab \
  --copy-to dist/build.aab

Uploading to Google Play

Once you've successfully built your .aab or .apk head over to the Google Play developer console, and create a draft release. Upload your .aab or .apk.