skip to Main Content

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?

3

Answers


  1. 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

    Login or Signup to reply.
  2. Click on show package details then tick the all command line version and download all of them. Your problem will be solved.

    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search