When i'm running
flutter build appbundle
I'm getting the next error:
Gradle build failed to produce an .aab file. Its likely that this file was generated under /path_to_project/build, but the tool couldnt find it.
But i still can create an apk. And i can create an appbundle of a new-created projected.
So, what should i fix to get an opportunity to build .aab? I can't just build a new project and switch code, because this is a 2-years project with some special lines in native code and idk where, because the previous developer added them, not me and i don't have an any connections with him :c
Previously, I was releasing APKs and I switched the project to AAB. The issue was that I was setting my archivesBaseName in my build.gradle to contain more useful information:
defaultConfig {
(..)
setProperty("archivesBaseName", applicationId + "." + flutterVersionName + "." + flutterVersionCode)
}
This was really a bad idea when switching to AAB, because Gradle would search for a app-release.aab, thus I would end up with this error message.
The obvious solution is to remove that line, so the output filename is correct.
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