Skip to content
Aqib Javed.
All guides

Developer guide · Windows and Mac

Fix 'cmdline-tools component is missing' in flutter doctor

By Aqib Javed · Updated Nov 2, 2026

Install the Android SDK Command-line Tools. In Android Studio open Tools > SDK Manager, switch to the SDK Tools tab, tick Android SDK Command-line Tools (latest) and click Apply. Without Android Studio, download the command-line tools zip from developer.android.com and unzip it so sdkmanager sits in <sdk>/cmdline-tools/latest/bin. Then run flutter doctor --android-licenses. Stackyard lists the SDK packages you have and their sizes, and flags a second SDK folder.

Why flutter doctor says the component is missing

Flutter looks for sdkmanager in the Android SDK's cmdline-tools/latest/bin folder first, then in the highest numbered cmdline-tools/<version>/bin folder. The old tools folder from the obsolete Android SDK Tools package doesn't count. If none is there, the Android toolchain line shows cmdline-tools component is missing.

The tools can also be installed in a different SDK than the one Flutter uses. flutter doctor -v prints the SDK it checks on the Android SDK at line. The defaults are ~/Library/Android/sdk on a Mac and %LOCALAPPDATA%\Android\Sdk on Windows.

How to install cmdline-tools in Android Studio (Mac and Windows)

  1. Open Android Studio and choose Tools > SDK Manager. On the welcome screen it's More Actions > SDK Manager.
  2. Check that Android SDK Location at the top is the SDK Flutter uses.
  3. Switch to the SDK Tools tab and tick Android SDK Command-line Tools (latest).
  4. Click Apply, accept the license, wait for the download, then click OK.
  5. Run flutter doctor in a new terminal.

How to install it from the command line

  1. Download the command line tools only zip for your system from the Android Studio download page on developer.android.com.
  2. Unzip it. You get a folder called cmdline-tools with bin, lib, NOTICE.txt and source.properties inside.
  3. In your SDK folder, create cmdline-tools/latest and move those four items into latest, so the path ends in cmdline-tools/latest/bin/sdkmanager.
  4. Use sdkmanager to install the rest of the SDK, then tell Flutter where the SDK is.

If you already have a numbered version under cmdline-tools, sdkmanager "cmdline-tools;latest" installs the latest one next to it. sdkmanager needs Java: it uses JAVA_HOME or java on PATH, and an older Java makes it fail with UnsupportedClassVersionError.

# Mac
~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0"
flutter config --android-sdk ~/Library/Android/sdk

# Windows (Command Prompt)
%LOCALAPPDATA%\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat "platform-tools" "platforms;android-36" "build-tools;36.0.0"
flutter config --android-sdk "%LOCALAPPDATA%\Android\Sdk"

Then accept the Android licenses

With the tools in place, flutter doctor usually moves on to the licenses. Run flutter doctor --android-licenses and type y for each one. With Command-line Tools 23.0 or later, Flutter needs version 3.47.3 or newer to read the license status. Older versions report Android license status unknown, which has its own fixes.

flutter doctor --android-licenses
flutter doctor

If it still says missing

  • The zip went straight into the SDK as cmdline-tools/bin. Flutter won't find it there: it has to be cmdline-tools/latest/bin or cmdline-tools/<version>/bin.
  • Flutter checks another SDK. Compare the Android SDK at line in flutter doctor -v with the SDK Location in Android Studio, then run flutter config --android-sdk with the right one.
  • ANDROID_HOME still points at an old or moved SDK. Update it, then open a new terminal.
  • Your editor's terminal started before the install. Restart VS Code or Android Studio and run flutter doctor again.

What Stackyard shows

Stackyard doesn't change what flutter doctor reports. It finds every Android SDK on the machine and flags a second SDK folder along with the projects whose local.properties point to it, which is often why the tools seem missing. For each SDK it lists the platforms, build-tools, NDKs and system images with their sizes and what uses them, and moves the ones you remove to the Trash or Recycle Bin. On Windows its doctor also catches an ANDROID_HOME that points to a missing folder and fixes it. It's free and open source, for Windows and Mac.

Questions

How do I install cmdline-tools in Android Studio?

Open Tools > SDK Manager, go to the SDK Tools tab, tick Android SDK Command-line Tools (latest) and click Apply.

Where are the Android command-line tools installed?

In the Android SDK, under cmdline-tools/latest, or cmdline-tools/<version> for a specific version. sdkmanager is in its bin folder.

Do I need Android Studio to build Flutter apps for Android?

No. The command-line tools zip plus sdkmanager can install the platform, build-tools and platform-tools Flutter needs, though Android Studio is the easier route.

How do I fix cmdline-tools component is missing on a Mac?

The same way as on Windows: install Android SDK Command-line Tools (latest) from Android Studio's SDK Manager, or put the command-line tools zip in ~/Library/Android/sdk/cmdline-tools/latest. Then run flutter doctor --android-licenses.

Is sdkmanager deprecated?

Google now marks it deprecated in favour of the android sdk command in its new Android CLI, and Command-line Tools 23.0 print a warning. sdkmanager still installs packages, and Flutter still uses it.