I’ve installed Android Studio and the SDK seems to be working fine. Android Studio says that the SDK it’s using is ~/Android/Sdk
.
I’ve tried following the solutions in [this][1] answer. (Mainly running flutter config --android-sdk "~/Android/Sdk"
[and expanding the path].) I initially had installed flutter with snap
but then later installed it via [manual installation][2] (to be extra sure).
When I run flutter doctor
, I get this output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.5, on Ubuntu 22.04.3 LTS 6.2.0-39-generic, locale en_US.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ 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
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2023.1)
[✓] VS Code (version unknown)
✗ Unable to determine VS Code version.
[✓] Connected device (2 available)
[✓] Network resources
! Doctor found issues in 1 category.
When I try to run flutter doctor --android-licenses
, I get this error:
Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.
I manually installed cmdline-tools in the ~/Android/Sdk
folder, and it is present.
I have been able to manually run the sdkmanager
by setting the --sdk_root
path manually:
~/Android/Sdk/cmdline-tools/bin/sdkmanager --sdk_root=~/Android/Sdk --licenses
But Flutter still says that I haven’t accepted the android-licenses
Any thoughts?
Thanks so much!
[1]: Flutter does not find android sdk
[2]: https://docs.flutter.dev/get-started/install/linux#method-2-manual-installation
2
Answers
I followed the answer at this question to add the command line tools from Android Studio instead of manually from the website. Then, running
flutter doctor --android-licenses
worked!Use :
Note that the path should be within quotes. Flutter lets you add the android sdk with commands.