Cmdline-tools component is missing
ivan@ivan-pk:~$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.2, on Ubuntu 22.04.1 LTS 6.5.0-21-generic, locale ru_RU.UTF-8)
[!] 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.
[✗] 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
You need to install Android Studio through the app store, if you haven't already installed it. Then as in the screenshots:
If flutter doctor still does not see the SDK, then you need to synchronize the paths
flutter config --android-sdk /var/android
In this case, /var/android is your path, which is indicated in the second screenshot of the Android SDK Location.
Next you may see this:
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
Therefore, we introduce:
flutter doctor --android-licenses
- Technology Stack:
- Ubuntu 22.04
- Flutter