Android

Build native Android mobile applications with Bini.js.

Android Overview

Bini.js allows you to build native Android mobile applications using Tauri. Your React app runs inside a WebView with full access to native Android APIs and features.

Native APK/AAB

Build Android apps as APK or AAB for Google Play Store distribution

Code Signing

Keystore signing for secure Play Store distribution

Auto Plugin Wiring

bini-native detects web APIs and wires Android permissions automatically

Full Configuration

Back button, status bar, splash screen — all configurable

Android apps are built using Tauri's Android backend. Your app runs in a native WebView with full system access.

Requirements

Before building Android apps, make sure you have the following installed:

  • Node.js 20.19.0 or higher
  • Java JDK 17 (JAVA_HOME set) — Download
  • Android Studio with SDK, Build Tools, and NDK (ANDROID_HOME set) — Download
  • Rust targets:
    • rustup target add aarch64-linux-android
    • rustup target add armv7-linux-androideabi
    • rustup target add i686-linux-android
    • rustup target add x86_64-linux-android
Set ANDROID_HOME to your Android SDK path (e.g., ~/Library/Android/sdk on macOS, %USERPROFILE%\AppData\Local\Android\Sdk on Windows).

Windows

Build Android apps natively on Windows using the CLI with Android Studio installed.

Setup on Windows

  • Install Node.js from nodejs.org
  • Install Java JDK 17 and set JAVA_HOME
  • Install Android Studio from developer.android.com
  • Set ANDROID_HOME to your SDK path
  • Install Rust targets with rustup
# Create a new Android project
npx create-bini-app@latest my-app --platform android

# Navigate to project
cd my-app

# Install dependencies
npm install

# Run on emulator or device
npm run android

# Build release APK/AAB
npm run android:build
All Android development commands work the same way on Windows, macOS, and Linux.

macOS

Build Android apps natively on macOS using the CLI with Android Studio installed.

Setup on macOS

  • Install Node.js from nodejs.org
  • Install Java JDK 17 and set JAVA_HOME
  • Install Android Studio from developer.android.com
  • Set ANDROID_HOME to ~/Library/Android/sdk
  • Install Rust targets with rustup
# Create a new Android project
npx create-bini-app@latest my-app --platform android

# Navigate to project
cd my-app

# Install dependencies
npm install

# Run on emulator or device
npm run android

# Build release APK/AAB
npm run android:build
All Android development commands work the same way on macOS, Windows, and Linux.

Linux

Build Android apps natively on Linux using the CLI with Android Studio installed.

Setup on Linux

  • Install Node.js from nodejs.org
  • Install Java JDK 17 and set JAVA_HOME
  • Install Android Studio from developer.android.com
  • Set ANDROID_HOME to your SDK path (e.g., ~/Android/Sdk)
  • Install Rust targets with rustup
# Create a new Android project
npx create-bini-app@latest my-app --platform android

# Navigate to project
cd my-app

# Install dependencies
npm install

# Run on emulator or device
npm run android

# Build release APK/AAB
npm run android:build
All Android development commands work the same way on Linux, Windows, and macOS.

Creating an Android App

Create a new Bini.js project targeting Android:

npx create-bini-app@latest my-app --platform android

Or use the interactive prompt and select android:

Prompt: Which platform would you like to target?

web / windows / macos / linux / android / ios

Select android and press Enter

npx create-bini-app@latest

The project structure includes Android-specific configuration in src-tauri/gen/android/.

Development

Run your Android app on an emulator or connected device:

npm run android

This launches your app with:

  • Hot reload for frontend changes
  • Native Android integration
  • Auto-wired native APIs (bini-native)
  • Devtools for debugging

Setting up an Emulator

  1. Open Android Studio
  2. Go to AVD Manager
  3. Create a virtual device
  4. Start the emulator
  5. Run npm run android

Building

Build a release APK or AAB for distribution:

npm run android:build

This creates a signed Android package in the src-tauri/gen/android/app/build/outputs/ directory.

Output Files

  • app-release.apk — APK for direct installation
  • app-release.aab — Android App Bundle for Google Play Store
The build output is a native Android app that runs on Android 5.0 (API 21) and above.

Code Signing

Configure keystore signing for Android apps at scaffold time or later. Create a keystore.properties file:

keystore.properties
# src-tauri/gen/android/keystore.properties
storeFile=my-keystore.keystore
storePassword=your-keystore-password
keyAlias=my-key-alias
keyPassword=your-key-password

Use --sign during scaffold to set up signing automatically:

npx create-bini-app@latest my-app --platform android --sign
For Google Play Store distribution, you must sign your app with a keystore. Keep your keystore secure and never commit it to version control.

Deployment

Deploy your Android project by pushing to GitHub:

npm run deploy

deploy does not build a signed APK or submit to the Play Store — it pushes the project source to GitHub.

Deployment Flow

  1. Build your release APK/AAB with npm run android:build
  2. Run npm run deploy to push source to GitHub
  3. Upload the APK/AAB to Google Play Console manually
Store submission is manual. After building your APK/AAB, upload it to the Google Play Console for distribution.