Flutter and Android Studio – Fix ‘cmdline-tools Component is Missing’ Error

androidandroid-studioflutterflutter-doctor

Android toolchain – I develop for Android devices (Android SDK version 30.0.3):

X cmdline-tools component is missing
  Run `path/to/sdkmanager --install "cmdline-tools;latest"`
  See https://developer.android.com/studio/command-line for more details.

Best Answer

The solution for me was opening Android Studio and going to SDK Manager, switch to the SDK Tools tab and check Android SDK Command-line Tools (latest).

enter image description here

Don't forget to add to your PATH the tools and platform-tools folder that are inside your SDK.