Guide APK modding

How to Export an APK from Android Studio (2026 Guide)

Export a signed release APK from Android Studio, build one in Flutter or React Native, and pull an installed APK off any phone.

Illustration for the article “How to Export an APK from Android Studio (2026 Guide)”, Android guides on APK modding
Contents

Exporting an APK from Android Studio means producing a signed release package through Build, Generate Signed Bundle or APK: choose the module, point at your release keystore, pick the release variant, and build. Flutter needs one command, React Native needs one Gradle task, and pulling an installed APK off a phone needs ADB. Export only builds you own, sign every release, and guard the keystore.

Part of the modding hub: How to Mod an APK · Pull installed apps: Extract an APK · Sign anything: Sign an APK.

By Abdul Emam, APK tester at ApkZena. I once shipped a test build signed with a debug key to a second device and spent an hour wondering why the release update refused to install over it. Different key, different app. Check the signature before you share anything.

This guide covers debug versus release builds, keystore setup, the Studio export wizard, Flutter and React Native builds, pulling installed APKs, the APK versus AAB decision, signing, and the build errors you will meet.

Debug vs Release APK

Debug APKs use a development configuration and are intended for testing, while release APKs use the production build settings and a release signing key; choose the release variant for distribution, then verify its certificate and behavior on a target device.

When Each Applies

Debug for daily development and logcat sessions. Release for testers, sideload distribution, and anything leaving your machine. A debug build that escapes into the wild cannot receive proper updates later, which strands everyone who installed it.

Before You Export

Before exporting, confirm that a release keystore exists, its passwords are available, a backup is stored securely, and the build variant is set to release; these checks prevent missing-key errors and accidental creation of a debug-signed artifact for distribution.

Set Up the Keystore

Create it once with keytool, record both passwords somewhere durable, and copy the file to two independent locations. Google’s app-signing documentation documents every flag and the reasoning behind keeping release keys private.

Back Up the Keystore First

Losing this file orphans every app it signs: no recovery, no appeal, reinstalls for all users. Back it up before the first export, not after the first scare. An encrypted USB drive plus an offline archive covers nearly every failure mode.

Configure Build Variants

Select the release variant in the Build Variants panel so the export uses production settings. Building the debug variant by accident produces a package that looks finished and behaves like a test build, including the wrong signature.

How to Export a Signed APK

Android Studio’s Generate Signed Bundle or APK wizard guides one-off exports and first-time keystore setup, prompting for the module, key, and release variant before building; verify the resulting certificate rather than relying only on the wizard’s success message.

Step 1: Open the Wizard

Choose Build, then Generate Signed Bundle or APK from the menu. Select APK rather than Bundle when the goal is direct distribution, since bundles only become installable through Play’s processing.

Step 2: Select the Module and Keystore

Pick the app module, then choose your release keystore file with its passwords. Create a new one here only if none exists, and back it up immediately after: the wizard will not remind you twice.

Step 3: Pick Release and Build

Select the release build type, enable shrinking, and run the build. The signed APK lands under app/release/, named with the variant and ready for verification.

Step 4: Verify With apksigner

apksigner verify --print-certs app-release.apk

Confirm your certificate and a clean result. Then install on a real device, not just an emulator, because hardware-specific code paths only exist on hardware.

How to Build an APK in Flutter

Flutter’s Android build compiles Dart code and packages the app through Gradle; after configuring release signing, flutter build apk --release creates an APK in the Flutter output folder that should be verified before distribution to testers on supported target devices.

The Release Command

flutter build apk --release

Add --split-per-abi for smaller per-architecture files that install faster on constrained devices. Outputs land in build/app/outputs/flutter-apk/, as documented in the Flutter Android deployment guide.

Signing Setup

Create android/key.properties pointing at your release keystore and wire it into the Gradle config. Without it, Flutter signs with debug keys and the output looks finished while carrying a throwaway identity.

How to Build an APK in React Native

React Native Android APKs build through the Gradle wrapper in the project’s android/ directory; configure the release keystore first, then use the project’s release task and follow the official signing guide for Gradle setup.

The Gradle Task

cd android && ./gradlew assembleRelease

The signed APK appears under android/app/build/outputs/apk/release/. Configure signingConfigs with the release keystore first, or the task emits an unsigned artifact needing apksigner afterward.

How to Extract an APK of an Installed App

Exporting compiles a new APK from a source project, while extraction copies the package already installed on a device; use an extractor or adb shell pm path with adb pull for the second task, following the APK extraction guide.

APK vs AAB for Distribution

An Android App Bundle is a publishing format that Google Play processes into device-specific APKs, while a standalone APK can be installed directly for testing or distribution; choose the artifact based on your target channel and the platform’s current requirements.

Which to Produce When

Play listing means AAB, always. Sideloading, tester handoff, archival, and modding bases mean APK. Producing the wrong artifact wastes a build cycle and confuses whoever receives it, so decide the channel before opening any wizard.

The APK versus AAB comparison covers bundle mechanics, Play signing, and the cases where each format wins.

How to Sign a Built APK

Android Studio can sign an APK when the export wizard or Gradle configuration supplies a keystore, while apksigner can sign and verify outputs from other build systems; check the certificate before sharing and keep the key available for future updates.

Keystore generation, scheme selection, and every error message live in the signing guide. Sign and verify as one motion before any file leaves your machine.

Common Build Errors

Missing keystores, absent signing configuration, Gradle failures, and removed reflective classes can affect Android Studio, Flutter, or React Native builds; inspect the first error message and identify whether signing, dependency setup, or release shrinking failed before retrying the build task.

Keystore Not Found

Wrong path, moved file, or mistyped alias. Confirm with your file manager and keytool -list, then store keystores in one fixed folder so paths never drift between projects.

Signing Config Missing

Gradle built without signingConfigs or the properties file it references. Add the config, point it at the release keystore, and rebuild. Unsigned outputs from this cause look complete and install nowhere.

Gradle Build Fails

Dependency resolution, SDK licenses, or version mismatches halt before packaging starts. Read the first error only: Gradle stops at the root cause, and everything below it is usually fallout.

R8 Removes Needed Code

Shrinking deletes a class the app reaches through reflection, producing runtime crashes in release builds that debug builds never show. Add keep rules for the affected classes, rebuild, and retest on hardware.

Version Code Conflicts

A release build with a version code at or below the installed copy installs as a downgrade and fails silently or loudly depending on the device. Bump versionCode for every distributed build, and record which code went to which tester group.

Missing SDK Components

A fresh machine without the right build-tools revision fails before compiling anything. Install the exact platform and build-tools versions the project targets through the SDK Manager, and keep them pinned across team machines.

Export Checklist Before Sharing

Before sharing a release APK, confirm the release variant, expected signing certificate, increasing version code, successful installation on a target device, and current keystore backup; these checks catch packaging mistakes before recipients rely on the file for testing or distribution.

Five Confirmations

  • Release variant selected, not debug.
  • apksigner verify names your production certificate.
  • Version code exceeds every build already distributed.
  • Installed and launched once on real hardware.
  • Keystore backup confirmed current before sending the file.

Export release builds, sign them with a backed-up keystore, and verify before sharing. When the goal is studying an installed app instead of building one, the extraction guide takes over from here.

Key Takeaways

  • Export release builds only, signed with a production keystore you back up twice.
  • Flutter and React Native each build release APKs from one command once signing is configured.
  • Verify every output with apksigner and test on a real device before distributing.

Frequently Asked Questions

What is the difference between a debug and a release APK?

Debug builds use an auto-generated key and keep debugging enabled, so they install only for testing and must never be distributed. Release builds are shrunk, signed with your production keystore, and represent the app's permanent identity. Ship release builds exclusively, and keep the keystore backed up twice.

How do I export a signed APK from Android Studio?

Open Build, then Generate Signed Bundle or APK, choose APK, select your module, and point the wizard at your release keystore. Pick the release variant, enable shrinking, and build. Verify the output with apksigner before distributing it to any device or tester.

What is a keystore?

A keystore is an encrypted file holding your private signing key and certificate, locked behind passwords you set. Android identifies your app by this key across every update it will ever receive. Losing the file permanently orphans the app, forcing users to reinstall under a new identity.

Can I extract an APK without root?

Yes. Extractor apps and ADB reach every app you installed with no root required, using pm path to locate the package and adb pull to copy it. Root matters only for system partitions you should leave alone. The full routine is in our extraction guide.

How do I build an APK in Flutter?

Run flutter build apk --release from the project root, or add --split-per-abi for smaller per-architecture files. Outputs land under build/app/outputs/flutter-apk/. Configure android/key.properties with your release keystore first, or the build signs with debug keys.

What is the difference between an APK and an AAB?

An APK installs directly on any device, while an AAB is a publishing container that only Google Play turns into device-specific APKs per device. Upload AABs to the store and export APKs for direct distribution, testing, and sideloading. Our APK versus AAB guide compares both paths.

How do I sign an APK I built?

Sign the APK with apksigner and your release keystore, then verify its certificate before distribution. Android Studio can sign during the wizard or through Gradle signingConfigs when configured. Confirm the build type and version code as well, since a valid signature alone does not make a debug build ready for users.

What is R8 shrinking?

R8 is Android's code shrinker and obfuscator: it removes unused classes and methods, then renames what remains. Release builds enable it to cut size and slow casual reverse engineering. Test shrunk builds on a real device, because aggressive shrinking occasionally removes code the app needs.

How do I verify an APK is signed correctly?

Run apksigner verify --print-certs against the file and confirm it names your certificate with no errors. A passing verify means the package is intact and installable. A failing one means the build, the key, or the file transfer needs attention before anything ships.

Can I build an APK for free?

Yes. Android Studio, the SDK build tools, Flutter, and React Native are all free, and signing with your own keystore costs nothing. The only real costs are a machine that runs the IDE and the discipline to back up your keystore twice.

Part of the complete guide

How to Mod an APK (Games): Methods, Tools and Risks (2026)

Also in APK modding: