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.
APK for direct install, AAB for Play Store
Keystore signing wired in at scaffold time
bini-native wires Android permissions
Requirements
Building Android apps requires the same toolchain on every desktop OS. See the section for your OS below for exact setup steps.
| Dependency | Version / Notes |
|---|---|
| Node.js | 20.19.0 or higher |
| Java JDK | 17 - Download (Eclipse Temurin), then set JAVA_HOME |
| Android Studio | SDK, Build Tools, and NDK - Download, then set ANDROID_HOME |
| Rust targets | aarch64-linux-android, armv7-linux-androideabi, i686-linux-android, x86_64-linux-android |
Add the required Rust targets with rustup:
$ 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.0or higher - Java JDK 17 - Download (Eclipse Temurin), then set
JAVA_HOME - Android Studio - Download. Install the SDK, Build Tools, and NDK.
- Set
ANDROID_HOMEto%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:
$ npx create-bini-app@latest my-app --platform android $ cd my-app $ npm install
Or use the interactive prompt and select Android:
$ npx create-bini-app@latest
? Select target platform:Web ApplicationWindows DesktopLinux DesktopmacOS Desktop> AndroidiOS↑↓ 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:
$ npm run android
$ npm run android:build
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.0or higher - Java JDK 17 - Download (Eclipse Temurin), then set
JAVA_HOME - Android Studio - Download. Install the SDK, Build Tools, and NDK.
- Set
ANDROID_HOMEto~/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:
$ npx create-bini-app@latest my-app --platform android $ cd my-app $ npm install
Or use the interactive prompt and select Android:
$ npx create-bini-app@latest
? Select target platform:Web ApplicationWindows DesktopLinux DesktopmacOS Desktop> AndroidiOS↑↓ 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:
$ npm run android
$ npm run android:build
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.0or higher - Java JDK 17 - Download (Eclipse Temurin), then set
JAVA_HOME - Android Studio - Download. Install the SDK, Build Tools, and NDK.
- Set
ANDROID_HOMEto~/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:
$ npx create-bini-app@latest my-app --platform android $ cd my-app $ npm install
Or use the interactive prompt and select Android:
$ npx create-bini-app@latest
? Select target platform:Web ApplicationWindows DesktopLinux DesktopmacOS Desktop> AndroidiOS↑↓ 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:
$ npm run android
$ npm run android:build
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:
$ 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
- Open Android Studio
- Go to AVD Manager
- Create a virtual device
- Start the emulator
- Run
npm run android
Building
Build a release APK or AAB for distribution:
$ npm run android:build
The build outputs land in src-tauri/gen/android/app/build/outputs/:
| Output | Purpose |
|---|---|
app-release.apk | Direct installation on a device (sideloading, internal testing). |
app-release.aab | Android App Bundle for publishing to the Google Play Store. |
Code Signing
Configure keystore signing at scaffold time or later. Create a keystore.properties file inside src-tauri/gen/android/:
storeFile=my-keystore.keystore
storePassword=your-keystore-password
keyAlias=my-key-alias
keyPassword=your-key-passwordOr pass --sign at scaffold time to set signing up automatically:
$ npx create-bini-app@latest my-app --platform android --sign
Deployment
npm run deploy pushes your project source to GitHub - it does not build a signed APK or submit to the Play Store:
$ npm run deploy
Deployment Flow
- Build your release APK/AAB with
npm run android:build - Run
npm run deployto push source to GitHub - Upload the APK/AAB to the Google Play Console manually