Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

enter image description here

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?

like image 539
Mircea Avatar asked Jun 05 '26 00:06

Mircea


2 Answers

Click on show package details then tick the all command line version and download all of them. Your problem will be solved.

like image 196
4rmin Avatar answered Jun 06 '26 14:06

4rmin


Mac OSX on M1 Silicon Chip

  1. Open Android Studio
  2. In the File Menu Go to Preferences or type in Command+,
  3. Click on Appearance and Behavior dropdown
  4. Click on System Settings dropdown
  5. Click on Android SDK
  6. In the window on the right look for the "SDK Tools" Tab it will be the second of three tabs.
  7. Click on SDK Tools
  8. Put a check mark in "Android SDK Command-line Tools (latest)"
  9. Wait till download completes

This Fixed the issue for me.

like image 39
Deon Don Avatar answered Jun 06 '26 12:06

Deon Don



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!