I had run this flutter build apk
to release my App. Now I had build verison 2 of that.
Now again I want to release my version 2 App.To get the release apk
When you are creating new Flutter project (from Android Studio menu), in file:
/android/app/build.gradle
which is there:
you have:
buildTypes {
release {
signingConfig signingConfigs.debug // <--- HERE YOU ARE USING DEBUG KEY
}
}
Which means that release
build (e.g. triggered from menu Build -> Flutter -> Build APK
) will use debug
key for signing.
Full build.gradle
file (created by Android Studio):
Change from:
signingConfig signingConfigs.debug
to:
signingConfig signingConfigs.release
so (in build.gradle
) you should have:
buildTypes {
release {
signingConfig signingConfigs.release
}
}