xiaohongshu
xiaohongshu
distributing-tauri-for-android
Guides the user through distributing Tauri applications for Android, including Google Play Store submission, APK and AAB generation, build configuration, signing setup, and version management.
Full skill instructions
This skill covers the complete workflow for preparing and distributing Tauri v2 applications on Android, including Google Play Store publication.
Before distributing your Tauri app for Android:
tauri android init if not already doneAfter initializing Android support, configure your app icon:
# npm
npm run tauri icon /path/to/app-icon.png
# yarn
yarn tauri icon /path/to/app-icon.png
# pnpm
pnpm tauri icon /path/to/app-icon.png
# cargo
cargo tauri icon /path/to/app-icon.png
This generates icons in all required sizes for Android.
Configure Android-specific settings in your tauri.conf.json:
{
"bundle": {
"android": {
"minSdkVersion": 24,
"versionCode": 1
}
}
}
| Option | Default | Description |
|---|---|---|
minSdkVersion | 24 | Minimum Android SDK version (Android 7.0) |
versionCode | Auto-calculated | Integer version code for Play Store |
Tauri automatically calculates the version code from your app version:
versionCode = major * 1000000 + minor * 1000 + patch
Example: Version 1.2.3 becomes version code 1002003
Override this in tauri.conf.json if you need sequential numbering:
{
"bundle": {
"android": {
"versionCode": 42
}
}
}
Default minimum is Android 7.0 (SDK 24). For higher requirements:
{
"bundle": {
"android": {
"minSdkVersion": 28
}
}
}
Common SDK versions:
Google Play requires AAB format for new apps. Generate an AAB:
# npm
npm run tauri android build -- --aab
# yarn
yarn tauri android build --aab
# pnpm
pnpm tauri android build -- --aab
# cargo
cargo tauri android build --aab
Output location:
gen/android/app/build/outputs/bundle/universalRelease/app-universal-release.aab
For testing or alternative distribution channels:
# npm
npm run tauri android build -- --apk
# yarn
yarn tauri android build --apk
# pnpm
pnpm tauri android build -- --apk
# cargo
cargo tauri android build --apk
Build for specific CPU architectures:
# Single architecture
npm run tauri android build -- --target aarch64
# Multiple architectures
npm run tauri android build -- --target aarch64 --target armv7
Available targets:
aarch64 - ARM 64-bit (most modern devices)armv7 - ARM 32-bit (older devices)i686 - Intel 32-bit (emulators)x86_64 - Intel 64-bit (emulators, some Chromebooks)Create separate APKs per architecture (useful for testing):
npm run tauri android build -- --apk --split-per-abi
Note: Not needed for Play Store submission. Google Play automatically serves the correct architecture from your AAB.
Create a release keystore for signing:
keytool -genkey -v -keystore release-key.keystore \
-alias my-app-alias \
-keyalg RSA \
-keysize 2048 \
-validity 10000
Important: Store your keystore securely. Losing it means you cannot update your app.
Create or update gen/android/keystore.properties:
storePassword=your_store_password
keyPassword=your_key_password
keyAlias=my-app-alias
storeFile=/path/to/release-key.keystore
Update gen/android/app/build.gradle.kts to use the keystore:
import java.util.Properties
import java.io.FileInputStream
val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android {
signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}
buildTypes {
release {
signingConfig = signingConfigs.getByName("release")
}
}
}
For automated builds, use environment variables:
android {
signingConfigs {
create("release") {
keyAlias = System.getenv("ANDROID_KEY_ALIAS")
keyPassword = System.getenv("ANDROID_KEY_PASSWORD")
storeFile = file(System.getenv("ANDROID_KEYSTORE_PATH"))
storePassword = System.getenv("ANDROID_STORE_PASSWORD")
}
}
}
gen/android/app/build/outputs/bundle/universalRelease/app-universal-release.aab
The initial submission requires manual upload through Play Console for signature verification. Google will manage your app signing key through Play App Signing.
Tauri currently does not offer built-in automation for creating Android releases. However, you can use the Google Play Developer API for automated submissions in CI/CD pipelines.
Ensure your keystore path is absolute or relative to the correct directory:
# Absolute path
storeFile=/Users/username/keys/release-key.keystore
# Relative to gen/android directory
storeFile=../../release-key.keystore
If using auto-calculation, ensure your package.json or Cargo.toml version is updated. For manual control:
{
"bundle": {
"android": {
"versionCode": 2
}
}
}
Check minimum SDK version compatibility:
# Check device Android version
adb shell getprop ro.build.version.sdk
Consider using --split-per-abi for testing, but for Play Store, Google handles this automatically. If still too large:
# Development build
npm run tauri android dev
# Release AAB for Play Store
npm run tauri android build -- --aab
# Release APK for testing
npm run tauri android build -- --apk
# Specific architecture
npm run tauri android build -- --aab --target aarch64
| File | Location |
|---|---|
| AAB output | gen/android/app/build/outputs/bundle/universalRelease/app-universal-release.aab |
| APK output | gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk |
| Gradle config | gen/android/app/build.gradle.kts |
| Keystore properties | gen/android/keystore.properties |
| Android manifest | gen/android/app/src/main/AndroidManifest.xml |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience