Hi all, I have both Flutter and Android Studio installed in my user account, when I run flutter doctor
I get the following in part:
!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
I’ve also tried to install just the command line tools ( commandlinetools-linux-8512546_latest.zip ) but wasn’t sure where to put it either.
Anyone able to offer any assistance with this?
Thanks!
user env is set ?
env | grep -Ei "FLUTTER|ANDROID|CHROME"
adndroid-sdk installed ?
I suppose, ANDROID_SDK_ROOT
is not set and so flutter can’t found sdk
~ env | grep -Ei "FLUTTER|ANDROID|CHROME" ✔
PATH=/home/chris/shell:/home/chris/android-studio/bin:/home/chris/Android/cmdline-tools/bin:/home/chris/flutter/bin:/home/chris/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
CHROME_EXECUTABLE=/usr/bin/google-chrome-stable
ANDROID_SDK_ROOT=/home/chris/Android/Sdk
ANDROID_SDK_HOME=/home/chris/.android
config is ok, is at you to install “command line tools”
install in your home ANDROID_SDK_ROOT
tree -L 1 /home/patrick/Android/Sdk/
/home/patrick/Android/Sdk/
├── build-tools
├── cmdline-tools
├── emulator
├── licenses
├── patcher
├── platforms
├── platform-tools
├── skins
├── sources
└── system-images
The error ? is installed: you have in PATH /home/chris/Android/cmdline-tools/bin
Thanks for your continued help, I’m getting closer:
/home/chris/Android/Sdk
├── ~
├── build-tools
├── cmdline-tools
├── emulator
├── licenses
├── patcher
├── platforms
├── platform-tools
├── skins
├── system-images
└── tools
However now when I run flutter doctor
I get the following:
> flutter doctor --android-licenses
Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.
I have found if I use the Android Studio it works as expected, however still can’t get flutter doctor to work correctly.