操作系统:Ubuntu 21.10
Android-Studio版本:2021.1.1
Flutter版本:2.10.2
如果我运行
但问题是,在运行
如果我运行
flutter doctor
,将会得到以下输出:[✓] 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.
但问题是,在运行
flutter doctor
之前,我已经通过Android Studio安装了cmdline-tools
。
同时,如果我在终端中运行 sdkmanager
命令,会收到以下消息:sdkmanager: command not found
。这两个程序都是通过 snap install
安装的:snap install android-studio --classic
和 snap install flutter --classic
。有人知道我做错了什么吗?