Android development

Android work uses the root AFFiNE toolchain, Android Studio, Rust command paths configured for the native build, and the Capacitor-based package at packages/frontend/apps/android.

Follow the current Android package README for local properties, build, sync, and Android Studio commands. Check the package package.json before copying a command from an older guide.

The Android Gradle build currently defaults AFFINE_ANDROID_NATIVE_TARGET to arm64; the value controls both Gradle ABI filters and the Rust Cargo target. For an x86_64 emulator, ensure the Gradle or Android Studio process receives AFFINE_ANDROID_NATIVE_TARGET=x86_64, then rebuild and sync. Keep the default for ARM64 devices or emulators.

Run the shared lint and type checks plus the tests that cover changed mobile-shared or core behavior. Record the ABI and emulator or physical-device validation separately from web validation.