[Flutter FAQs] About flutter doctor

flutter doctor

Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.

flutter doctor is one of the command line commands from the Flutter SDK which helps us diagnose issues with our setup for building Android and iOS apps using Flutter.

This article is about FAQs of flutter doctor.

FAQs

Flutter plugin not installed and Dart plugin not installed

There are issues about Flutter and Dart plugin when run command flutter doctor.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$ flutter doctor
╔════════════════════════════════════════════════════════════════════════════╗
║ A new version of Flutter is available! ║
║ ║
║ To update to the latest version, run "flutter upgrade". ║
╚════════════════════════════════════════════════════════════════════════════╝


Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v1.15.22, on Mac OS X 10.15.7 19H2, locale en)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2020.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.50.1)
[!] Connected device
! No devices available

! Doctor found issues in 3 categories.

Run command flutter upgrade to resolve these issues.

1
2
3
4
5
6
$ flutter upgrade
Flutter is already up to date on channel stable
Flutter 2.0.0 • channel stable • [email protected]:flutter/flutter.git
Framework • revision 60bd88df91 (15 hours ago) • 2021-03-03 09:13:17 -0800
Engine • revision 40441def69
Tools • Dart 2.12.0

CocoaPods installed but not working

1
2
3
4
5
6
7
8
9
10
$ flutter doctor
...
[!] Xcode - develop for iOS and macOS (Xcode 12.4)
✗ CocoaPods installed but not working.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
To re-install CocoaPods, run:
sudo gem install cocoapods
...

Or

1
2
3
4
5
6
7
8
...
[!] Xcode - develop for iOS and macOS
✗ CocoaPods installed but not working.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
...

Install cocoapods gem

1
$ gem install cocoapods

Finaly

Run flutter doctor again.

1
2
3
4
5
6
7
8
9
10
11
12
13
$ flutter doctor
Running "flutter pub get" in flutter_tools... 1,268ms
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.0, on macOS 11.2.2 20D80 darwin-x64, locale en)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.2.3)
[✓] VS Code (version 1.53.2)
[✓] Connected device (1 available)

• No issues found!

Disable Analytics reporting

You can disable Analytics reporting by run command flutter config --no-analytics.

1
2
3
4
$ flutter config --no-analytics 
Analytics reporting disabled.

You may need to restart any open editors for them to read new settings.

References

[1] Flutter - Beautiful native apps in record time - https://flutter.dev/