What is Flutter Doctor and how to run it?
Flutter doctor is a command line tool. We can use flutter doctor to check weather our flutter and dart configurations are upto mark or there is some issue in them.
To run a flutter doctor we can simply open our command prompt by typing cmd in the windows search. In the command prompt write the following command and hit enter.
C:\Users\Dell> flutter doctor
How to fix Flutter doctor android studio plugin(Dart , Flutter) issue?
If you are facing Flutter Plugin not found or maybe both flutter and dart plugin not found error and you have already installed Dart & Flutter plugin in Android Studio. But the flutter doctor gives the plug-in is not installed issue. Then in that case you have to follow the below mentioned steps.
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.16299.19], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
Solution
To solve the issue flutter plugin not installed or flutter plugin cannot be found by flutter doctor. First you have to make sure that you have already installed the plugins as mentioned here or watch the video. If still flutter and dart plugins are not found then run the followings commands…
flutter upgrade
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
flutter doctor -v
flutter channel stable
flutter upgrade
Android Licenses Not Accepted
To use Flutter properly, you should get a supported IDE (with official Dart & Flutter SDK plugins), so either Android Studio or Visual Studio Code. Install one of these and install the two mentioned plugins for them. Then, as flutter doctor says, run flutter doctor --android-licenses
, because you probably didn’t agree to them yet and you have to do that before you start developing with Flutter SDK.
To solve the follwing issue follow the steps in the solution section below.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.14.6 18G103, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
Solution
To solve the issue – android license not accepted run the command below.
C:\Users\Dell>flutter doctor --android-licenses