Setting up Flutter development Environment for Ubuntu Linux and Verify using “flutter doctor”

If you have followed our previous article “How to Install Flutter on Ubuntu Linux” , the next step is to setup rest of the things like, Android Studio, ADB connection etc so that we can start developing the Flutter Applications.

The command “flutter doctor” checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it is not necessary to install Dart separately.

 $ flutter doctor 
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale en_IN)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.4)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device

! Doctor found issues in 3 categories.

As we can see above, first thing Flutter doctor shows to us that, “some licenses are not accepted” For accepting licenses, use below command,

 $ flutter doctor --android-licenses 
 $ flutter doctor 
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale en_IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[!] Android Studio (version 3.4)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device

! Doctor found issues in 2 categories.

As, we can see above now flutter doctor replaced “!” with “✓” so we are one step ahead.

Now, Make sure you have installed Android Studio , if not follow the article “How to install Android Studio for 64 bit Ubuntu machines” once you have installed Android Studio, we have to install Flutter and Dart Plugins to Android Studio as mentioned in “Install the Flutter and Dart plugins with Android Studio”

After you have installed plugins with Android studio, lets try flutter doctor again,

 $ flutter doctor 
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale en_IN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Android Studio (version 3.4)
[!] Connected device

! Doctor found issues in 1 categories.

As we can see above, flutter doctor detected Android Studio and the last issue remained is with the device connection as flutter requires your android device to be connected to your machine using adb. For this, connect your device/mobile to your machine and follow steps as mentioned in “Flutter not detecting device / “flutter devices” No devices detected”

Once you have fixed, any issues with your device connection, now once again run flutter doctor and see how it reports,

$ flutter doctor 
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale en_IN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Android Studio (version 3.4)
[✓] Connected device (1 available)

• No issues found!

Now, you are ready to start developing Flutter Applications.

Follow Lynxbee

Leave a Reply / Ask Question