'Flutter doctor: cmdline-tools component is missing
OS: Ubuntu 21.10 Android-Studio: 2021.1.1 Flutter: 2.10.2
If I am running flutter doctor I will get the following output:
[✓] Flutter (Channel stable, 2.10.2, on Ubuntu 21.10 5.13.0-30-generic, locale en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.1)
[✓] VS Code
[✓] Connected device (2 available)
[✓] HTTP Host Availability
! Doctor found issues in 2 categories.
But the thing is that I've installed cmdline-tools via android studio before running flutter doctor
And at the same time if I will run in terminal the sdkmanager I will get the fallowing message:
sdkmanager: command not found
Both of the programs were installed via snap install
snap install android-studio --classic
snap install flutter --classic
Does anyone know what I am doing wrong?
Solution 1:[1]
click on show package details then tik the all command line version and download all of them your problem will be solve
Solution 2:[2]
try running the following line:
path/to/sdkmanager --install "cmdline-tools;latest"
and then run flutter doctor -v
if does not help
try install the android-studio again by downloading the latest android-studio.deb file from the official site and install it:
sudo tar -xvf file_name
sudo mv android-studio /opt
cd /opt/ && sudo ln -s /opt/android-studio/bin/studio.sh sbin/studio
and it's installed, ready to run
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | 4rmin |
| Solution 2 | Marcelo Cesar |

