Skip to content

Expert · Publishing to the stores and the web · topic 44 of 50 · 35 min

Publishing on Google Play

Explanation

Create an upload keystore with keytool, keep it and its passwords safe, reference it from a key.properties file that is never committed, configure release signing in android/app/build.gradle(.kts), and run flutter build appbundle. Upload the .aab to Google Play Console (one-time US$25 registration), fill in the store listing, Data safety and content rating, and release through testing tracks. New personal accounts must complete a closed test first; check the current rules.

Step 1: create an upload key

Every Android app must be digitally signed. With Play App Signing, Google keeps the final app signing key, and you sign your uploads with your own upload key. Create the upload keystore once with keytool, which comes with Java (Android Studio includes a JDK).

bash
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
From the Flutter docs. On Windows, use a path like C:\Users\you\upload-keystore.jks. You will be asked for passwords and your name or organisation.
Careful: Keep the keystore file and passwords private and backed up (for example in a password manager and an encrypted backup). Never commit them to Git or share them in chat. With Play App Signing a lost upload key can be reset through Google support, but it is slow and stressful.

Step 2: key.properties

ini
storePassword=<your-store-password>
keyPassword=<your-key-password>
keyAlias=upload
storeFile=<full path to upload-keystore.jks>
android/key.properties. Add key.properties to .gitignore. Values here are placeholders.

Step 3: signing configuration

kotlin
// android/app/build.gradle.kts (newer projects use the Kotlin DSL)
import java.io.FileInputStream
import java.util.Properties

val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
    keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}

android {
    // ...
    signingConfigs {
        create("release") {
            keyAlias = keystoreProperties["keyAlias"] as String
            keyPassword = keystoreProperties["keyPassword"] as String
            storeFile = keystoreProperties["storeFile"]?.let { file(it) }
            storePassword = keystoreProperties["storePassword"] as String
        }
    }
    buildTypes {
        release {
            signingConfig = signingConfigs.getByName("release")
        }
    }
}
Older projects use build.gradle (Groovy) with equivalent settings; the Flutter Android deployment guide shows both.

Step 4: build the App Bundle

bash
flutter build appbundle
# output: build/app/outputs/bundle/release/app-release.aab
Google Play requires the Android App Bundle (AAB) format for new apps; Play generates optimised APKs per device from it.

Step 5: Play Console

  1. Create a Google Play developer account (a one-time US$25 fee at the time of writing, plus identity verification).
  2. Create the app and fill in the store listing: name, short and full descriptions, icon, feature graphic and screenshots.
  3. Complete App content: privacy policy URL, Data safety form (declare what your app and its SDKs, like Firebase, collect), ads, content rating questionnaire and target audience.
  4. Upload the .aab to a testing track (internal, closed or open), invite testers and fix feedback.
  5. For personal accounts created after 13 November 2023, Google requires a closed test with at least 12 testers opted in for 14 continuous days before applying for production access (as of 2025; check the current Play Console rules).
  6. Release to production, ideally as a staged rollout (for example 10% of users first), and watch crash and ANR rates.

Google also requires apps to target a recent Android API level, raised every year. Flutter sets targetSdk through its Gradle settings; when you upgrade Flutter, check the target and test your app. The official "target API level requirement" page has the current deadline.

Think of it like this: Your upload key is like the rubber stamp of your shop that you put on every parcel you send to the courier company (Google). Google then re-packs each parcel with its own seal for customers. If someone else gets your stamp, they could send parcels in your name, so keep it locked away.

Common mistakes

  • Committing key.properties or the keystore to a public GitHub repository.
  • Building a debug-signed bundle by mistake: Play rejects it.
  • Forgetting the INTERNET permission in the main manifest: the release app cannot load data.
  • Leaving the 12-tester, 14-day closed test until the week before a deadline.

Need help?

Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.

Try:

Watch the lesson

Publishing on Google Play · 1/6

keytool -genkey ... -alias upload

Create an upload keystore once with key tool. Keep it and its passwords private and backed up.

Prefer a video by a teacher? Find free videos on “flutter publish google play store keystore key.properties appbundle” on YouTube ↗

In real life: Shipping a tuition centre app

A freelancer builds a Flutter app for a tuition centre in Kanpur. She creates the upload keystore, stores it and its passwords in a password manager with an encrypted backup, adds key.properties to .gitignore, builds the AAB, and creates the Play Console listing in English and Hindi. Twenty students and parents join a closed test for three weeks; after production access is granted, she releases with a 20% staged rollout.

Practice (0/3 done)

Task 1 · Question

Where should key.properties be kept?

Task 2 · Question

Which command builds the file you upload to Google Play?

Task 3 · Practice

Set up release signing for an app: create an upload keystore with keytool, write key.properties with placeholder values replaced locally, configure signingConfigs in the Gradle file, add key.properties and *.jks to .gitignore, build an app bundle, and (if you have an account) upload it to an internal testing track.

Quick quiz

Question 1

1.With Play App Signing, which key do you keep?

Question 2

2.What is the one-time Google Play developer registration fee (at the time of writing)?

Question 3

3.Which form declares what user data your app and its SDKs collect?

Question 4

4.Why release to production with a staged rollout?

Read more (free)

Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.

With Play App Signing, which key do you keep?

Answer: The upload key

Google holds the app signing key.

What is the one-time Google Play developer registration fee (at the time of writing)?

Answer: US$25 one-time

Check the current fee when you sign up.

Which form declares what user data your app and its SDKs collect?

Answer: Data safety

Shown to users on the listing.

Why release to production with a staged rollout?

Answer: Problems affect only a small share of users before a full release

You can halt a bad rollout.

With Play App Signing, who holds the app signing key?Related

Answer: Google

You keep the upload key; Google keeps the app signing key.

From Release builds, signing and the App Bundle

What is the size of a Play Store app icon?Related

Answer: 512 x 512

The high-resolution icon is 512 x 512 PNG.

From Google Play Console and testing tracks

Why does Google raise the target API requirement every year?Related

Answer: So apps adopt newer privacy and security behaviour

Newer targets enable newer protections.

From Play policies: privacy, data safety and targets

Which Xcode file should you open for a Flutter iOS project?Related

Answer: ios/Runner.xcworkspace

The workspace includes CocoaPods dependencies.

From Publishing on the Apple App Store

Pass the quiz (60% or more) or mark this topic as done when you are ready.

Your progress is saved on this device only.

Next steps

  1. 2 more topics in “Publishing to the stores and the web” before its exam: Publishing on the Apple App Store, Flutter on the web and desktop.
  2. Module 11 exam: Publishing to the stores and the web · 12 questions · 25 min, without help. 4 topics of this module still to finish first.
  3. Then the next module, Flutter careers and interviews. 50 topics left in the course before the final exam.

← Previous: Preparing a release