Creating an APK file is an essential step to test your Flutter app or upload it to the Google Play Store. In this guide, you’ll learn how to generate a release APK for your Flutter application step by step, including best practices and common mistakes to avoid.


Prerequisites

Before generating an APK, make sure you have:

  • Flutter SDK installed
  • Android Studio installed
  • Flutter & Dart plugins enabled
  • A working Flutter project
  • Java JDK (included with Android Studio)

To verify Flutter installation, run:

flutter doctor

Fix any issues shown before proceeding.


Step 1: Open Your Flutter Project

Open your Flutter project using Android Studio, VS Code, or terminal.

cd your_flutter_project

Step 2: Clean the Project (Recommended)

Cleaning removes old build files and avoids unexpected errors.

flutter clean
flutter pub get

Step 3: Configure App Details (Optional but Important)

Update App Name

Edit:

android/app/src/main/AndroidManifest.xml
<application
    android:label="My Flutter App"
    ...
>

Update App Icon

Use the flutter_launcher_icons package:

dev_dependencies:
  flutter_launcher_icons: ^0.13.1

flutter_icons:
  android: true
  image_path: "assets/icon/app_icon.png"

Run:

flutter pub run flutter_launcher_icons

Step 4: Generate a Keystore (For Release APK)

This step is mandatory for Play Store publishing.

keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key

Move key.jks to:

android/app/

Step 5: Configure Signing in Flutter

Create key.properties

Path:

android/key.properties
storePassword=your_password
keyPassword=your_password
keyAlias=key
storeFile=key.jks

Update build.gradle

File:

android/app/build.gradle

Add:

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
}

Step 6: Build APK

Run the following command:

flutter build apk

For a smaller APK, use:

flutter build apk --split-per-abi

Step 7: Locate the APK File

After build completion, find the APK here:

build/app/outputs/flutter-apk/app-release.apk

For split APKs:

build/app/outputs/flutter-apk/

Step 8: Test the APK

  • Transfer APK to an Android device
  • Enable Install from Unknown Sources
  • Install and test thoroughly

Common Errors & Fixes

ErrorSolution
Keystore not foundCheck key.properties path
Build failedRun flutter clean
Version conflictUpdate dependencies
APK too largeUse --split-per-abi

APK vs AAB (Important Note)

APKAAB
Manual installRequired for Play Store
Larger sizeOptimized per device
Good for testingBest for production

👉 For Play Store, always upload AAB:

flutter build appbundle

Conclusion

You have successfully learned how to create an APK for a Flutter application. This APK can be used for testing, sharing, or pre-release distribution. For Play Store publishing, prefer AAB format.


FAQ

Q: Can I create APK without Android Studio?
Yes, using Flutter CLI only.

Q: Is keystore required for debug APK?
No, only for release APK.

Categories: Flutter

2 Comments

  • How to Download and Install the Latest Version of Power BI (2026 Guide) - Dheeraj Hitech · January 16, 2026 at 4:14 pm

    […] Requirements for Power BI […]

    How to Set Up app-ads.txt for Any Mobile App (Android, iOS, Flutter) – Complete Guide 2026 - Dheeraj Hitech · January 17, 2026 at 2:06 pm

    […] you are using Google AdMob or any other ad network in your mobile application, you may have seen a warning […]

    Leave a Reply

    Avatar placeholder

    Your email address will not be published. Required fields are marked *