0
0
FlutterHow-ToBeginner · 4 min read

How to Deploy Flutter Apps to Google Play Store

To deploy a Flutter app to the Play Store, first create a signed APK or App Bundle using flutter build appbundle. Then, upload the generated file to the Google Play Console, fill in the app details, and submit it for review.
📐

Syntax

Use the Flutter command to build a release version of your app as an Android App Bundle (.aab) or APK (.apk). The common commands are:

  • flutter build appbundle - builds an Android App Bundle for Play Store upload.
  • flutter build apk --release - builds a release APK.

Before building, you must configure signing in android/app/build.gradle and create a keystore.

bash
flutter build appbundle
flutter build apk --release
💻

Example

This example shows how to build a signed app bundle ready for Play Store upload.

1. Generate a keystore:

keytool -genkey -v -keystore ~/my-release-key.jks -alias my_key_alias -keyalg RSA -keysize 2048 -validity 10000

2. Reference the keystore in android/key.properties:

storePassword=your_store_password
keyPassword=your_key_password
keyAlias=my_key_alias
storeFile=../my-release-key.jks

3. Configure signing in android/app/build.gradle under signingConfigs.

4. Build the app bundle:

bash
flutter build appbundle
Output
Built build/app/outputs/bundle/release/app-release.aab (signed)
⚠️

Common Pitfalls

1. Missing signing configuration: Without a proper keystore and signing setup, the Play Store will reject your app.

2. Uploading debug builds: Always build a release version; debug builds are not accepted.

3. Versioning errors: Make sure to update versionCode and versionName in android/app/build.gradle for each release.

4. Not enabling Play App Signing: It is recommended to enable Play App Signing for better security and easier updates.

bash
/* Wrong: building debug APK */
flutter build apk

/* Right: building release APK */
flutter build apk --release
📊

Quick Reference

  • Create a keystore with keytool.
  • Configure signing in android/app/build.gradle.
  • Build release app bundle with flutter build appbundle.
  • Upload the .aab file to Google Play Console.
  • Fill app details, screenshots, and submit for review.

Key Takeaways

Always build a signed release app bundle using flutter build appbundle before uploading.
Configure your keystore and signing settings correctly in your Flutter Android project.
Update versionCode and versionName for every new release to avoid Play Store errors.
Use Google Play Console to upload your app bundle, add app details, and submit for review.
Enable Play App Signing for better app security and easier updates.