flutter_mobile_doctor
Find the Flutter configuration problems that break Android and iOS builds — before Gradle or Xcode does.
flutter_mobile_doctor is a pure Dart CLI. It reads your project files,
reports concrete problems and suggests fixes. No native code, no plugins, no
network calls.
Why?
The checks are based on problems Flutter developers report repeatedly:
- unresolved
io.flutter.pluginsymbols during Gradle sync (flutter/flutter#19830) - NDK version errors with newer Android Gradle plugins (flutter/flutter#139427)
- Android builds failing when the project and SDK are on different drives (flutter/flutter#105395)
- missing or outdated iOS Podfile deployment targets
Install
dart pub global activate flutter_mobile_doctor
Usage
From the root of a Flutter project:
flutter_mobile_doctor
Or point it at any project:
flutter_mobile_doctor --path ../my_app
Options:
--path <dir> Project root (default: current directory)
--json Machine-readable JSON output
--brief Hide the Why/Fix explanation lines
--help Show help
--version Show version
Exit codes make it CI-friendly:
| Code | Meaning |
|---|---|
0 |
No errors (warnings may still exist) |
1 |
At least one error was found |
2 |
Invalid command line |
Example CI step:
dart pub global activate flutter_mobile_doctor
flutter_mobile_doctor --brief ./app
Checks
Android
android/local.propertiesexists and itsflutter.sdk/sdk.dirpaths exist.- Gradle wrapper is version 7.0 or newer.
- Android Gradle plugin is declared in
android/build.gradle. android.useAndroidX=trueandandroid.enableJetifier=true.minSdkVersionis at least 21.ndkVersion flutter.ndkVersionis not pinned when using AGP 8+.- App manifest and
applicationIdare present. - On Windows: project and
FLUTTER_ROOTare on the same drive.
iOS
ios/Podfileexists and declaresplatform :ios, '12.0'or newer.ios/Runner.xcodeproj/project.pbxprojexists.ios/Runner/Info.plistexists.
Programmatic API
import 'dart:io';
import 'package:flutter_mobile_doctor/flutter_mobile_doctor.dart';
final issues = analyzeProject(Directory('.'));
print(formatReport(issues));
if (hasErrors(issues)) {
// Fail the build.
}
See example/ for a runnable script.
License
MIT — see LICENSE.
Libraries
- flutter_mobile_doctor
- Diagnose common Android and iOS configuration problems in Flutter projects.