In this post, we are going to show you how to fix "cmdline-tools component is missing" error in Flutter. or you may also get error "ensure that the cmdline-tools are installed to resolve this" error on command "flutter doctor" in terminal.
[!] 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.
To solve this issue you need to install Android SDK Command-line Tools on SDK Manager. Follow the steps below:
Now, check the command "flutter doctor" in your terminal to check if the error still occurs then check the android_sdk_path\Android\Sdk\cmdline-tools. There may be two or more "latest" folder like below:
Delete the "latest" folder and rename "latest-2" to "latest". This happens when there is a "latest" folder while installing Android SKD command-line tools in SDK manager.
In this way, you can solve "cmdline-tools component is missing" error on Flutter.