I followed the steps for deployment for flutter using this website https://flutter.io/android-release/
And when i run flutter build apk i get this error
Execution failed for task ':app:validateSigningRelease'.
> Keystore file filepath/key.jks> not found for signing config 'release'.
what i'm i missing to make it so it will sign for release?
when i change the line signingConfig signingConfigs.release
to signingConfig signingConfigs.debug
in my build.gradle it works, but to need it to be sign for release
my build.gradle
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
folder structure:
Project
-Android
|-- .gradle
|-- app
| |-- src
| | `-- main
| | |-- java
| | |-- res
| | `-- AndroidManifest.xml
| `-- build.gradle
|-- gradle
| `-- wrapper
|-- gradle.properties
|-- gradlew
|-- local.properties
|-- proguard-rules.pro
|-- gradlew.bat
`-- key.properties
i left out files under wrapper, java, and res
key.properties
storePassword=<placeholder1>
keyPassword=<placeholder1>
keyAlias=key
storeFile=</Users/Conner/key.jks>
You must remove the '<' chars, it's only as sample data.
storePassword=yourpasswordhere
keyPassword=yourkeypasswordhere
keyAlias=youralias
storeFile=/your/path/key.jks
To avoid conflicts place the key.jks file inside android\app\key folder and in key.properties file add
storePassword=yourpasswordhere
keyPassword=yourkeypasswordhere
keyAlias=youralias
storeFile=key/key.jks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With