Skip to main content

flutter_mobile_doctor 0.1.0 copy "flutter_mobile_doctor: ^0.1.0" to clipboard
flutter_mobile_doctor: ^0.1.0 copied to clipboard

Diagnose common Android and iOS configuration problems in Flutter projects. A pure Dart CLI with no native code and no platform plugins.

flutter_mobile_doctor #

pub package License: MIT

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:

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.properties exists and its flutter.sdk / sdk.dir paths exist.
  • Gradle wrapper is version 7.0 or newer.
  • Android Gradle plugin is declared in android/build.gradle.
  • android.useAndroidX=true and android.enableJetifier=true.
  • minSdkVersion is at least 21.
  • ndkVersion flutter.ndkVersion is not pinned when using AGP 8+.
  • App manifest and applicationId are present.
  • On Windows: project and FLUTTER_ROOT are on the same drive.

iOS #

  • ios/Podfile exists and declares platform :ios, '12.0' or newer.
  • ios/Runner.xcodeproj/project.pbxproj exists.
  • ios/Runner/Info.plist exists.

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.

1
likes
160
points
56
downloads

Documentation

API reference

Publisher

verified publisherthodz.com

Weekly Downloads

Diagnose common Android and iOS configuration problems in Flutter projects. A pure Dart CLI with no native code and no platform plugins.

Repository (GitHub)
View/report issues

Topics

#flutter #android #ios #cli #doctor

License

MIT (license)

More

Packages that depend on flutter_mobile_doctor