Learn Pain Less

HomeOur TeamContact
Flutter
[Solved] Fixing cmdline-tools component is missing Error in Flutter
Pawneshwer Gupta
Pawneshwer Gupta
August 03, 2023
1 min
[Solved] Fixing cmdline-tools component is missing Error in Flutter

In Flutter, the ”cmdline-tools component is missing” error typically occurs when the necessary command-line tools are not installed or configured correctly. This error may appear when running Flutter commands, such as “flutter doctor,” “flutter pub get,” or any other command that requires the Flutter SDK’s command-line tools.

Error may look like below

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
✗ cmdline-tools component is missing
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://docs.flutter.dev/get-started/install/windows#android-setup for more details.

How to solve ‘cmdline-tools component is missing’ Error:

  • Open Android Studio and click on the Tools menu.
  • Select SDK Manager.

note: if your are using Android studio 2022.3.1 or above with ’New UI’ then you will see SDK Manager as shown in screenshot.

Fixing cmdline-tools component is missing Error in Flutter
Fixing cmdline-tools component is missing Error in Flutter

Or follow bellow steps from file menu:

Fixing cmdline-tools component is missing Error in Flutter
Fixing cmdline-tools component is missing Error in Flutter

  • In the SDK Platforms tab, make sure that the latest version of the Android SDK is installed.
  • In the SDK Tools tab, check the box next to Android SDK Command-line Tools (latest).

Fixing cmdline-tools component is missing Error in Flutter
Fixing cmdline-tools component is missing Error in Flutter

  • Click Apply and then OK.

Once you have installed the Android SDK Command-line Tools, you should be able to run the flutter doctor command without any errors.

If you are still getting the error after following these steps, you can try the following:

  1. Close Android Studio.
  2. Goto Android SDK installation directory and There may be two or more ”latest” folder like below:

Fixing cmdline-tools component is missing Error in Flutter
Fixing cmdline-tools component is missing Error in Flutter

  1. Delete the ”latest” folder and rename “latest-2” to “latest”.This happens when there is a ”latest” folder while installing Android SDK command-line tools in SDK manager.

Now try to run flutter doctor command again and now hopefully ’cmdline-tools component is missing’ Error gone.

By following these steps, you should be able to resolve the ”cmdline-tools component is missing” error in Flutter and proceed with your development tasks. Remember to keep your Flutter SDK and related dependencies up-to-date for a smooth development experience.

If you are still having problems, you can try searching for help on the Flutter forums or the Flutter issue tracker.

Here are some additional resources that you may find helpful:

  • Install help: https://docs.flutter.dev/get-started/install/help

Learn Flutter in 90 days with Pawneshwer!

Dart Beginners Course in Hindi free of cost for limited period.

Start Learning

250+

LESSONS

30+

COURSES

15+

TUTORS

Subscribe to our newsletter!

We'll send you the best of our blog just once a month. We promise.

Tags

Flutter ErrorFlutter SDKAndroid SDK

Share


Pawneshwer Gupta

Pawneshwer Gupta

Software Developer

Pawneshwer Gupta works as a software engineer who is enthusiastic in creating efficient and innovative software solutions.

Expertise

Python
Flutter
Laravel
NodeJS

Social Media

Related Posts

Write Unit Test to Check Button Click in Flutter
Write Unit Test to Check Button Click in Flutter
May 11, 2023
2 min
Learn Pain Less  © 2024, All Rights Reserved.
Crafted with by Prolong Services

Quick Links

Advertise with usAbout UsContact Us

Social Media