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.
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.
Or follow bellow steps from file menu:
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:
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:
LESSONS
COURSES
TUTORS
Quick Links
Legal Stuff
Social Media