Short answer
If the app has Android product flavors, run with --flavor (flutter run --flavor staging). If android/app/build.gradle renames APKs (outputFileName), remove the rename or rename a copy after the build. If android/build.gradle no longer points the build folder at the project’s build directory, restore the lines from a fresh flutter create project. Then flutter clean and build again.
Why flutter can’t find the APK, and the fix
01
Product flavors, but no --flavor
“Replace this with the name of your Android product flavor” Flutter, Set up flavors for Android
With flavors defined, Gradle names the files app-staging-debug.apk and so on, while flutter without --flavor looks for app-debug.apk. Pass the flavor every time, also in your IDE run configuration.
flutter run --flavor staging flutter build apk --flavor production --release02
A custom APK file name
On current stable Flutter, a block in android/app/build.gradle that sets outputFileName (for example to add the version) changes the name flutter expects. Remove it, or copy and rename the APK in a script after flutter build apk. Newer Flutter builds copy the APK under the expected name, so this cause fades after upgrading.
// Groovy: remove blocks like this from android/app/build.gradle applicationVariants.all { variant -> variant.outputs.all { outputFileName = "myapp-${variant.versionName}.apk" } }03
The build folder was moved
Flutter’s Android template sends Gradle output to the project’s top-level build folder. If those lines were removed or changed in android/build.gradle.kts (or android/build.gradle in older Groovy projects), the APK lands somewhere the tool doesn’t look. Restore them from a fresh flutter create project.
// android/build.gradle.kts (from the Flutter template) val newBuildDir: Directory = rootProject.layout.buildDirectory .dir("../../build") .get() rootProject.layout.buildDirectory.value(newBuildDir) subprojects { val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) project.layout.buildDirectory.value(newSubprojectBuildDir) } // android/build.gradle (older Groovy projects) rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" }
Checked against the vendor’s docs on : Flutter: Set up flavors for Android; Flutter tool source: where flutter looks for the APK (gradle.dart); Flutter template: android/build.gradle.kts.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
Related: Android “Execution failed for task” · Flutter “:app:compileFlutterBuildDebug” failed · Gradle “Could not resolve all files” · Flutter Gradle assembleDebug failed