flutter-android-build-triage
Installation
SKILL.md
Flutter Android build triage
Fix a failing Flutter Android build by locating the blame line — the one line in Gradle's wall of output that names the actual culprit (a plugin, a version, a missing symbol, a full disk) — and matching it to the fix table below. Everything above the blame line is noise.
Steps
- Reproduce and capture. Run the failing build and keep the output:
flutter build apk --debug 2>&1 | grep -B5 -A15 -iE 'what went wrong|error:|caused by|Could not|ENOSPC|No space|license|sdk' | head -60Completion criterion: you have 10–60 lines containing the blame line — the line that names the missing/incompatible thing. - Match the blame line to a row in the symptom table and apply that fix. If the line names a native function (e.g.
sqlite3_initialize), it's a packaging problem, not Dart code — see the native-libs row. - Verify with a clean build:
flutter clean && flutter pub get && flutter build apk --debug. Completion criterion: output ends withBuilt build/app/outputs/flutter-apk/app-debug.apk. - If Dart APIs changed (e.g. after a package downgrade), fix call sites and re-run
flutter analyze+flutter testuntil both are clean.