I am Getting Error "Cmdline-Tools Component Is Missing" After Installing Flutter and Android Studio... I Added the Android Sdk. How to Solve Them

I am getting error cmdline-tools component is missing after installing Flutter and Android Studio... I added the Android SDK. How can I solve them?

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.

I'm getting the error 'cmdline-tools component is missing and Android license status unknown , when i run the command flutter doctor

I was able to solve the issue using the following steps.

  1. Updating the SDK in the Android Studio.
  2. Updating the SDK tools in the Android Studio.
  3. Downloading the Android SDK Command line Tools.

I followed this article : https://flutter-developer.medium.com/flutter-flutter-doctor-results-with-cmdline-tools-component-is-missing-f6371a9c6e97

In Android Studio cmdline-tools component is missing

It was needing to restart the PC

Flutter doctor results with cmdline-tools component is missing

You can follow below steps in order to ensure proper working of your flutter project:
your sdk manager should look something like this:

enter image description here

1. Installing Android SDK Command-line Tools in Android Studio:

Preferences > Appearance & Behavior > System Settings > Android SDK > SDK Tools >

install these 3 tools:

Android SDK Command-line Tools (latest)

Android SDK Build Tools 31

Android SDK Platform tools (latest version 31)

and make sure every tools must be of same latest version in order to avoid any error as there might be new updates later on.

2. Also make sure to Accept Android Licences by running below command in your cmd:

flutter doctor --android-licenses

if anything above didn't worked out make sure you have set the proper JDK/JRE locations in environment variables in system settings of windows:

Add below path in your System environment path variable for user variable as well as your system variable:

 C:\Program Files\Java\jdkXXXXX\bin 

here XXX is your version and this should be added in your sys var and user both

C:\Users\Neha\AppData\Local\Android\Sdk\tools
C:\Users\Neha\AppData\Local\Android\Sdk\build-tools
C:\Users\Neha\AppData\Local\Android\Sdk\platform-tools

the above three paths should be added in your user variable path
check two screenshots attached below for proper path settings.
I have added android studio's tools path also so do that as I have done in screenshot.

This one is for user variable path:

enter image description here

This one is for system variable path:

enter image description here

Follow source to learn more about setting the path for java:



Related Topics



Leave a reply



Submit