[Solved] Flutter command line-tools component is missing Error

Hello friends, Yesterday when I was running the flutter doctor command then I suddenly see the flutter has launched its new version 2.5.0 . So I thought let’s upgrade to new version of flutter. If you don’t know how to upgrade to newer version of Flutter they you can ready my this tutorial here. Now after upgrading when I run the Flutter Doctor command again then I had seen couple of errors on the screen. Now when I search that error on Google, I found that many of us developers have facing the same problem. So I thought let’s make a complete tutorial on this Error and solve this error step by step and help my other developer friends. So in this tutorial we would learn about [Solved] Flutter command line-tools component is missing Error in Android.

Complete Error :-

Android toolchain – develop for Android Devices (Android SDK version 31.0.0)
cmdline-tools component is missing
Run ‘path/to/sdkmanager –install “cmdline-tools;latest”‘
See https://developer.android.com/studio/command-line for more details.
Android license status unknown.
Run ‘flutter doctor –android-licenses’ to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

Screenshot of Error :-

Contents in this project [Solved] Flutter command line-tools component is missing Error in Android :-

1. To Solve this error we have to manually download and install the Command Line Tools in Android SDK manager from Android Studio. So start Android Studio.

2. Click on More Actions.

3. Click on SDK Manager.

4. Select -> Android SDK -> SDK Tools -> Then Check Android SDK Command-line Tools(latest) and download and install it.

5. Here you go not after installing Command line tools we are good to go. Next step is to Accept the Android SDK license. So open CMD in your computer and execute below command.

Screenshot :

6. Now we have to add both Android SDK Manager – Tools and Platform Tools folder path in Environment variable’s PATH variable. To set path Go To -> This PC(My Computer) -> Advanced System Settings -> Advanced -> Environment Variable -> Under User Variables -> Click on Path. Now add you own system’s Android SDK Manager Tools Folder and Android SDK Manager Platform Tools folder path inside it. See my screenshot below. Add your own path here, In below screenshot this is my SDK Manger Path.

Now you are good to go, Now restart your computer and after restarting when you run flutter doctor command again you’ll see the error is gone.

Screenshot after solving the Error :-

Leave a Reply

Your email address will not be published. Required fields are marked *