Android Builds
Primio builds native Android packages directly from your project. There are two Android build formats — here’s what they are and when to use each.
APK vs AAB — what’s the difference?
Section titled “APK vs AAB — what’s the difference?”Android has two distribution formats. This can be confusing if you’re coming from iOS, where there’s only one format (IPA) for both testing and publishing.
APK (Android Package) is a standalone installer file. You can send it to anyone, and they can install it directly on their Android device — no app store needed. Think of it like a .exe on Windows or a .dmg on Mac. Use APKs for testing and sharing during development.
AAB (Android App Bundle) is Google Play’s required format for publishing new apps. Unlike APK, you can’t install an AAB directly on a device. Instead, you upload it to Google Play, and Google generates optimized APKs for each device automatically (smaller downloads, better performance). Use AAB only when you’re ready to publish to Google Play.
| APK | AAB | |
|---|---|---|
| Purpose | Testing & direct sharing | Google Play submission |
| Install directly on device? | Yes | No |
| Google Play submission? | No (not accepted for new apps) | Yes (required) |
| Plan | Free | Paid plan (Build or Scale) |
| When to use | During development, sharing with testers | When publishing to Google Play |
Typical workflow: Build APKs frequently during development to test on real devices. Build one AAB when you’re ready to submit to Google Play.
APK builds
Section titled “APK builds”Build time: ~10 minutes
APK builds are the fastest way to get your app running on a real Android device or in the in-workspace Emulator. You can start an APK build from the Workspace or by asking the agent in chat.
From the Workspace
Section titled “From the Workspace”-
Open the Build section
Go to Workspace → Build → Android.
-
Select APK
Choose APK as the build type.
-
Click “Build APK”
The build starts and you can track progress in real time.
-
Download, scan, or run in the Emulator
When the build completes, download the APK file, scan the QR code with your phone to install it directly, or click Run in emulator to launch it in the workspace.
From chat (via the AI agent)
Section titled “From chat (via the AI agent)”In Edit mode, ask the agent to build an Android APK (in either release or debug mode) — for example, “Build a release APK” or “Build a debug Android APK and make sure it compiles.”
- While the build is running, a tool card in chat shows live progress, and the Workspace build list stays in sync.
- If the build fails with Gradle or compiler errors, the agent automatically inspects the error output, fixes the code or project configuration, and rebuilds.
- Once complete, the chat card provides a Download button to save the
.apkand a Run button to open the build directly in the Emulator.
Installing the APK
Section titled “Installing the APK”Your Android device may ask you to allow installation of unknown apps. This is normal for apps installed outside Google Play.
- Open the downloaded APK on your Android device
- If prompted, allow the app you opened it from (your browser or file manager) to install unknown apps — on Android 8.0 and newer this is the per-app Install unknown apps setting (the exact path varies by device)
- Return to the installer and confirm
QR code install
Section titled “QR code install”After the build finishes, a QR code appears next to the download link. Scan it with your phone’s camera to download and install the APK directly — no need to transfer files from your computer.
AAB builds
Section titled “AAB builds”Build time: ~10 minutes | Requires a paid plan
AAB (Android App Bundle) is the format Google Play requires for all new apps. Google Play generates optimized APKs from the AAB for each device configuration, resulting in smaller downloads for your users.
You can start an AAB build in two ways:
- From the Workspace: Go to Workspace → Build → Android, select AAB, and start the build.
- From chat: In Edit mode, ask the agent to build an Android AAB (for example, “Build a release AAB for Google Play”). When the build finishes, click Download directly on the build card in chat or download it from your Workspace build history.
Important notes
Section titled “Important notes”Build history & fixing failed builds
Section titled “Build history & fixing failed builds”Past builds are listed below the build button in Workspace → Build → Android (including builds triggered by the agent in chat). Each entry shows:
- Build status (waiting, running, completed, or failed)
- Download link for completed builds
- Error messages and a Try to fix button for failed builds (which sends the failure details to the agent in chat so it can repair and rebuild)
- QR code for APK downloads
In Discuss mode, you can also ask the agent to inspect your recent Android build status and explain why a build failed before switching to Edit mode to apply a fix.
Scroll down to load older builds.
SDK versions
Section titled “SDK versions”APK and AAB builds use the Android toolchain set for your project: Compile SDK, Min SDK, Target SDK, NDK, Gradle, Android Gradle Plugin (AGP), Kotlin, and Java.
Change them from SDK Versions.
Next steps
Section titled “Next steps”Once you have an AAB file, follow the Google Play Submission Guide to publish your app on Google Play.