This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.

Recipe: build Android with EAS

Use native CI preparation for the separate Expo config, EAS profile and .ci/prepare-native.sh.
Use native CI preparation for the separate Expo config, EAS profile and .ci/prepare-native.sh. Declare host.android in the Exact manifest. The image needs JDK 17+ and Android command-line tools. Set JAVA_HOME to the JDK (or put both java and javac on PATH), and ANDROID_HOME to the SDK. ANDROID_NDK_HOME can select an NDK explicitly; otherwise Exact finds one under the SDK.
In EAS production, create EXACT_KEYSTORE as a secret file variable containing the upload keystore that signs the bundle. Create secret strings EXACT_KEYSTORE_PASSWORD, EXACT_KEY_ALIAS and EXACT_KEY_PASSWORD. The reference covers EAS-managed credentials.
Create .eas/build/eas-android.yml:
Build my Android app with EAS
Paste this into Claude, Cursor, Codex, or another agent.
yaml
build:
name: Exact Android
steps:
- eas/checkout
- run:
name: Prepare Exact
shell: /bin/sh
command: |
set -eu
sh .ci/prepare-native.sh android
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \
'platforms;android-37.2' 'build-tools;37.0.0' 'ndk;27.1.12297006'
- eas/install_node_modules
- eas/resolve_build_config
- run:
name: Bundle
command: |
set -eu
bun "$EXACT/scripts/exact.mjs" setup --check --platform android
export EXACT_BUILD_NUMBER="${ eas.job.version.versionCode }"
bun exact.mjs android --bundle --json > artifact.json
- eas/upload_artifact:
inputs:
type: application-archive
path: target/android/app/outputs/bundle/release/app-release.aab
Accept SDK licenses only after reviewing them. The setup check names missing packages and compiler paths. Gradle uses Exact's settings repositories even if a worker init script adds project repositories.
EXACT_VERSION becomes versionName and the resolved number becomes versionCode. The bundle requires all four upload credentials and bakes production trust (LLP 1030.003 D6, D8). With deploy.store.android absent or "0", every change ships as a new build. At "A", the bake needs public verification keys in deploy.signing.keys and EXACT_UPDATE_RECEIPT for an existing stream or EXACT_UPDATE_GENESIS=1 for a new one (LLP 1030.006). Keep the private publishing key off EAS. For an APK, set EXACT_UPDATE_TRUST=production and use android --release --no-install --json; its path is target/android/app/outputs/apk/release/app-release.apk. Neither command contacts adb. JSON reports the artifact path; logs go to stderr.
Run bunx eas build --platform android --profile exact --non-interactive after the account, credentials and build counter are ready. EAS workers have built the APK and a bundle signed with an EAS-managed upload key this way; an upload, Play submission and device start have not been run. The publisher owns the Play record, upload key and submission credentials.
Is this helpful
Last updated November 23, 2026
Exact Docs