I am getting error “cmdline-tools component is missing” after installing Flutter and Android Studio… I added the Android SDK.
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).
OR
Open your command-line interface or terminal on your computer.
Navigate to the directory where your Android SDK is installed. The path could vary depending on your operating system and how you installed the SDK.
Once you’re in the SDK directory, run the following command:
path/to/sdkmanager --install "cmdline-tools;latest"
Make sure to replace path/to/sdkmanager
with the correct path to the sdkmanager
executable on your system.
- The
sdkmanager
command will download and install the latest version of thecmdline-tools
component. - After the installation is complete, you should have the necessary
cmdline-tools
component available on your system. - Verify the installation by running the
sdkmanager
command without any parameters. This will display a list of available packages, and you should seecmdline-tools
in the list.
Remember that you might need administrative privileges or superuser access to install the component, depending on your operating system and SDK installation location.
Once you have installed the cmdline-tools
component, you should be able to use Android SDK tools from the command line as expected. For more information and details on using the command-line tools, you can refer to the official Android Developer documentation at https://developer.android.com/studio/command-line.