DEV Community

mehboob rehman
mehboob rehman

Posted on

Flutter build APK issues

Flutter Build Fails, Team Frustration & A Quest for a Permanent Fix – Can You Relate?

As a Flutter Developer and Software Engineer Trainee at Silver Point Communication, this past week has been a wild ride — not because of writing features, but because of trying to get the APK to build consistently for the whole team.

Here's the situation:

Every time someone on the team pulls the latest code from main, they hit the dreaded APK not found or Gradle build errors. Even running flutter clean and flutter pub get doesn't always solve it.

We’re using:

Flutter 3.32.5

AGP 8.4.1

Gradle 8.6

Java 17

And yes, all the build paths and plugins are mostly set up correctly.

But still…

What I tried:

Created a custom build_and_install.sh script to delete .dart_tool, ephemeral, and regenerate fresh builds

Located exact APK paths:

android/app/build/outputs/flutter-apk/app-debug.apk

android/app/build/outputs/flutter-apk/app-release.apk

Shared the symlink fix with my team

Tested multiple Flutter commands manually

Everything works on my machine — but teammates still get errors after merge

Why I’m sharing this:

I believe sharing our technical struggles is just as important as sharing wins. This experience taught me:

Build automation is a critical (and underrated) part of Flutter workflows

Flutter + AGP upgrades = extra care with Gradle paths

Documentation for team builds must be bulletproof

Now I need your advice:

How do you ensure smooth builds in team projects using latest Flutter & Gradle versions?

Any best practices, CI/CD tips, or build.gradle configurations that helped your team?

What mistakes should we avoid when setting up shared environments?

Thanks in advance to the amazing dev community here. I'm still learning — and this is part of the journey.

Let’s solve this together.

flutter #android #flutterdev #gradle #softwareengineering #developerlife #buildautomation #techtips

Top comments (0)