Android

Build native Android mobile applications with Bini.js.

Android Overview

Bini.js builds native Android applications on top of Tauri v2. Your React app runs inside a native Android WebView with full access to system APIs, permissions, and platform features.

Native APK / AAB

APK for direct install, AAB for Play Store

Code Signing

Keystore signing wired in at scaffold time

Auto Plugin Wiring

bini-native wires Android permissions

Android builds use Tauri's Android backend. Your app runs in a native WebView with full system access.

Requirements

Building Android apps requires the same toolchain on every desktop OS. See the section for your OS below for exact setup steps.

DependencyVersion / Notes
Node.js20.19.0 or higher
Java JDK17 - Download (Eclipse Temurin), then set JAVA_HOME
Android StudioSDK, Build Tools, and NDK - Download, then set ANDROID_HOME
Rust targetsaarch64-linux-android, armv7-linux-androideabi, i686-linux-android, x86_64-linux-android

Add the required Rust targets with rustup:

>_Terminal
$ 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
ANDROID_HOME points to your SDK path - ~/Library/Android/sdk on macOS, ~/Android/Sdk on Linux, or %USERPROFILE%\AppData\Local\Android\Sdk on Windows.

Windows

Android apps can be built natively on Windows - Tauri's Android toolchain runs locally on all three desktop OSes.

Step 1: Install the tools

  • Node.js 20.19.0 or higher
  • Java JDK 17 - Download (Eclipse Temurin), then set JAVA_HOME
  • Android Studio - Download. Install the SDK, Build Tools, and NDK.
  • Set ANDROID_HOME to %USERPROFILE%\AppData\Local\Android\Sdk
  • Rust via rustup, then add the Android targets (see Requirements)

Step 2: Create the project

Create the Project

Create a new Bini.js project targeting Android and install its dependencies:

>_Terminal
$ npx create-bini-app@latest my-app --platform android
$ cd my-app
$ npm install

Or use the interactive prompt and select Android:

>_Terminal
$ npx create-bini-app@latest
>_Terminal
? Select target platform:
Web Application
Windows Desktop
Linux Desktop
macOS Desktop
> Android
iOS
 
↑↓ navigate • ⏎ select

Step 3: Develop and build

Run android to launch on an emulator or connected device, then android:build to produce a release APK/AAB:

>_Terminal
$ npm run android
>_Terminal
$ npm run android:build
Tip: Install USB drivers for your device if deploying to a physical phone.

macOS

Android apps can be built natively on macOS - Tauri's Android toolchain runs locally on all three desktop OSes.

Step 1: Install the tools

  • Node.js 20.19.0 or higher
  • Java JDK 17 - Download (Eclipse Temurin), then set JAVA_HOME
  • Android Studio - Download. Install the SDK, Build Tools, and NDK.
  • Set ANDROID_HOME to ~/Library/Android/sdk
  • Rust via rustup, then add the Android targets (see Requirements)

Step 2: Create the project

Create the Project

Create a new Bini.js project targeting Android and install its dependencies:

>_Terminal
$ npx create-bini-app@latest my-app --platform android
$ cd my-app
$ npm install

Or use the interactive prompt and select Android:

>_Terminal
$ npx create-bini-app@latest
>_Terminal
? Select target platform:
Web Application
Windows Desktop
Linux Desktop
macOS Desktop
> Android
iOS
 
↑↓ navigate • ⏎ select

Step 3: Develop and build

Run android to launch on an emulator or connected device, then android:build to produce a release APK/AAB:

>_Terminal
$ npm run android
>_Terminal
$ npm run android:build
Tip: Add the Android SDK platform-tools directory to your PATH so adb is available from the terminal.

Linux

Android apps can be built natively on Linux - Tauri's Android toolchain runs locally on all three desktop OSes.

Step 1: Install the tools

  • Node.js 20.19.0 or higher
  • Java JDK 17 - Download (Eclipse Temurin), then set JAVA_HOME
  • Android Studio - Download. Install the SDK, Build Tools, and NDK.
  • Set ANDROID_HOME to ~/Android/Sdk
  • Rust via rustup, then add the Android targets (see Requirements)

Step 2: Create the project

Create the Project

Create a new Bini.js project targeting Android and install its dependencies:

>_Terminal
$ npx create-bini-app@latest my-app --platform android
$ cd my-app
$ npm install

Or use the interactive prompt and select Android:

>_Terminal
$ npx create-bini-app@latest
>_Terminal
? Select target platform:
Web Application
Windows Desktop
Linux Desktop
macOS Desktop
> Android
iOS
 
↑↓ navigate • ⏎ select

Step 3: Develop and build

Run android to launch on an emulator or connected device, then android:build to produce a release APK/AAB:

>_Terminal
$ npm run android
>_Terminal
$ npm run android:build
Tip: Install the udev rules for your device - otherwise adb may not detect connected phones.

Development

Run your Android app on an emulator or a connected device. This works the same on every desktop OS:

>_Terminal
$ npm run android

This launches your app with:

  • Hot reload for frontend changes
  • Native Android integration
  • Auto-wired native APIs via 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:

>_Terminal
$ npm run android:build

The build outputs land in src-tauri/gen/android/app/build/outputs/:

OutputPurpose
app-release.apkDirect installation on a device (sideloading, internal testing).
app-release.aabAndroid App Bundle for publishing to the Google Play Store.
The output is a native Android app that runs on Android 5.0 (API 21) and above.

Code Signing

Configure keystore signing at scaffold time or later. Create a keystore.properties file inside src-tauri/gen/android/:

keystore.properties
storeFile=my-keystore.keystore
storePassword=your-keystore-password
keyAlias=my-key-alias
keyPassword=your-key-password

Or pass --sign at scaffold time to set signing up automatically:

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

Deployment

npm run deploy pushes your project source to GitHub - it does not build a signed APK or submit to the Play Store:

>_Terminal
$ npm run deploy

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 the Google Play Console manually
Store submission is manual. After building your APK/AAB, upload it to the Google Play Console for distribution.
Was this helpful?