0
When I try to give a flutter build apk --release in my app it returns the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file 'C:\Users\Lucas Daniel\androiapp\android\app\Users\Lucas Daniel\androiapp\key.jks' not found for signing config 'release'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
However the path to the file is correct, despite repeating twice in msg, I do not understand. This is my key properties file.:
storePassword=lucas17
keyPassword=lucas17
keyAlias=key
storeFile=/Users/Lucas Daniel/androiapp/key.jks
And this here is my build.Radle file:
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 27
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.androiapp"
minSdkVersion 16
targetSdkVersion 27
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
Anyone can help?
C:\Users\Lucas Daniel\androiapp\android\app\Users\Lucas Daniel\androiapp\key.jks
is correct? Did not missC:
instoreFile
? ...storeFile=C:/Users/Lucas Daniel/androiapp/key.jks
– NoobSaibot
I added and the error persisted equal, so I closed and opened the console again and I succeeded!!! Thank you very much, that error came out as a dot and comma in a Debug, but I’ll stay more attentive, good job!
– Lucas Daniel
If you want to put your comment as an answer I’ll give you the upvote
– Lucas Daniel