Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Flutter release build fails: validateSigningRelease, keystore file not set

ErrorExecution failed for task ':app:validateSigningRelease'.

Short answer

Gradle ran the release signing config but storeFile came out empty. In a Flutter app that means android/key.properties was not found, a key in it is misspelled, or the path is wrong. Put key.properties in the android folder, check the four key names, and give storeFile a path that exists.

  • Applies to Flutter 3.35, Android Gradle Plugin 8.x, Gradle 8.x
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check that key.properties exists in the android folder, and that the app's Gradle file reads it. If the file is missing, the signing config silently ends up with no keystore.

    ls -l android/key.properties
    grep -n "keystoreProperties\|signingConfig" android/app/build.gradle*
  2. 2Match what you see, then jump to its fix

    1. 1ls says No such file or directory, or the file sits in the project root or in android/appkey.properties is missing or in the wrong folderFix
    2. 2key.properties exists but the error staysA key name or the storeFile path is wrongFix
    3. 3The release build works on your laptop and fails in the pipelineThe build runs on a machine that does not have the keystore (CI)Fix

What does the error look like?

  • Execution failed for task ':app:validateSigningRelease'.
  • Keystore file not set for signing config release

Cause 1 of 3

key.properties is missing or in the wrong folder

1Check

The Flutter guide reads the file with rootProject.file("key.properties"). In a Flutter project the root project is the android folder, so the file must be android/key.properties. If the file is not there, the properties stay empty and storeFile is null.

ls android/key.properties
grep -n "key.properties" android/app/build.gradle*

2Fix

Create android/key.properties with the four entries from the Flutter guide, and keep it out of source control.

# android/key.properties
storePassword=your-store-password
keyPassword=your-key-password
keyAlias=upload
storeFile=/absolute/path/to/upload-keystore.jks

3Verify

Run the release build again.

flutter build appbundle --release

Confirmed by docs.flutter.dev

Did this fix it?

Cause 2 of 3

A key name or the storeFile path is wrong

1Check

The Gradle code reads the names storePassword, keyPassword, keyAlias and storeFile exactly. A different spelling gives null. On Windows the path needs double backslashes. A relative storeFile is resolved from the app module folder by file(...), so an absolute path is the safe choice.

cat android/key.properties
ls -l "$(grep '^storeFile=' android/key.properties | cut -d= -f2-)"

2Fix

Match the key names exactly and point storeFile at a file that exists. On Windows write the path like C:\\Users\\you\\upload-keystore.jks.

# android/app/build.gradle.kts, inside android { }
signingConfigs {
    create("release") {
        keyAlias = keystoreProperties.getProperty("keyAlias")
        keyPassword = keystoreProperties.getProperty("keyPassword")
        storeFile = keystoreProperties.getProperty("storeFile")?.let { file(it) }
        storePassword = keystoreProperties.getProperty("storePassword")
    }
}

3Verify

Clean once, then build again. The Flutter guide advises flutter clean after Gradle signing changes.

flutter clean
flutter build apk --release

Confirmed by docs.flutter.dev

Did this fix it?

Cause 3 of 3

The build runs on a machine that does not have the keystore (CI)

1Check

key.properties and the keystore are private and should not be in the repository, so a fresh checkout on CI has neither.

git ls-files android/key.properties

2Fix

Make the pipeline create key.properties and the keystore file from its secret store before the build step.

# CI step, secrets come from the CI secret store
echo "$KEYSTORE_BASE64" | base64 -d > android/upload-keystore.jks
printf 'storePassword=%s\nkeyPassword=%s\nkeyAlias=upload\nstoreFile=%s\n' \
  "$STORE_PASSWORD" "$KEY_PASSWORD" "$PWD/android/upload-keystore.jks" > android/key.properties

3Verify

Re-run the pipeline. validateSigningRelease passes.

flutter build appbundle --release

Confirmed by docs.flutter.dev

Did this fix it?

How do I stop it coming back?

  • Add android/key.properties and the .jks file to .gitignore.
  • Use an absolute storeFile path, or put the keystore next to the app's Gradle file.
  • Back up the keystore and its passwords outside the repository.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Google Play says the app does not support 16 KB memory pages

check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a

Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.

5 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.