Flutter release build fails: validateSigningRelease, keystore file not set
Execution 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.
Fix it fast
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*2Match what you see, then jump to its fix
- 1
ls 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
key.properties exists but the error staysA key name or the storeFile path is wrongFix - 3
The release build works on your laptop and fails in the pipelineThe build runs on a machine that does not have the keystore (CI)Fix
- 1
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.jks3Verify
Run the release build again.
flutter build appbundle --releaseConfirmed by docs.flutter.dev
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 --releaseConfirmed by docs.flutter.dev
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.properties2Fix
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.properties3Verify
Re-run the pipeline. validateSigningRelease passes.
flutter build appbundle --releaseConfirmed by docs.flutter.dev
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:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
Related fixes
Mobile apps
Signing a release build stops with Failed to read key from keystore
Failed to read key from keystore
Gradle opened the signing config but could not get the key out of the keystore.
3 causes, each with a fixMobile 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 fixMobile apps
Gradle cannot find com.google.firebase:firebase-analytics-ktx
Required by: project :app
Firebase moved the Kotlin extensions into the main modules and stopped releasing the -ktx modules in July 2025.
2 causes, each with a fixMobile apps
Gradle cannot create LibraryVariantBuilderImpl in a Flutter Android build
Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl
This error appears when the Android Gradle plugin (AGP) cannot run in the Gradle or IDE you use.
3 causes, each with a fixMobile apps
Flutter release build cannot open the keystore: HmacPBESHA256 not available
Algorithm HmacPBESHA256 not available
The keystore is a PKCS12 file protected by a newer algorithm than the Java that is reading it understands.
3 causes, each with a fixMobile apps
Android install error: the package conflicts with an existing package of the same name
The package conflicts with an existing package by the same name
Android allows only one app per application ID, and an update must be signed with the same certificate as the installed version.
3 causes, each with a fix