I am trying to build apk using following cmd fvm flutter build apk
I am getting below mentioned error please suggest a solution.
Error:
PS C:\Users\ARcaN\Desktop\otrack_flutter_app> fvm flutter build apk
Building with sound null safety
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDevRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> SigningConfig "release" is missing required property "storeFile".
* 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 4m 11s
Running Gradle task 'assembleRelease'... 255.1s
Gradle task assembleRelease failed with exit code 1
Signing Configs
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
Your error SigningConfig "release" is missing required property "storeFile" clearly says that you are missing signing details.
You need to add signing details like keyAlias, keyPassword ... under your android/app/build.gradle file
In short you need to let Android know about your signing details so that they can sign your app and provide you a release. you can create your debug build with signing detail
here are the sample format
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
follow this article to know more about it
https://blog.codemagic.io/the-simple-guide-to-android-code-signing/