androidfluttersdkandroid-sdk-managercommand-line-tool

Android CLT: SDK Manager not found


I have installed Android Command Line Tools on Windows 10. I am unable to install Android Studio.

I have then installed the files needed to run Android Command Line Tools. When I run flutter doctor -v, I receive the output:

[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.19045.4355], locale en-GB)
    • Flutter version 3.19.6 on channel stable at C:\Users\myUser\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (2 weeks ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\myUser\AppData\Local\Android\Sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = C:\Users\myUser\AppData\Local\Android\Sdk
    • ANDROID_SDK_ROOT = C:\Users\myUser\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Java\jdk-22.0.1+8-jre\bin\java
    • Java version OpenJDK Runtime Environment Temurin-22.0.1+8 (build 22.0.1+8)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.35)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.34729.46
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.4355]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 124.0.6367.118
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 124.0.2478.67

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

This means all of the files needed to run Android Command Line Tools are installed. Android Studio isn't installed but it isn't necessary.

When I attempt to use Android Command Line Tools, there is an error, because the sdkmanager can't be found. However, the sdkmanager file is located at C:\Program Files\Android\cmdline-tools\latest\bin\sdkmanager.bat

The directory containing the sdkmanager.bat file is added to the system PATH variable.

I have run the command sdkmanager --version, which returns sdkmanager: command not found

I have attempted to reinstall the Android Command Line Tools and flutter, which has not worked.


Solution

  • If you are using Windows, the command for sdkmanager is sdkmanager.bat

    Similarly, the command for avdmanager is avdmanager.bat