2

I've been following Alan Pope's Blog Getting started with Flutter.

I think that there is an error in the instructions as "flutter config --android-studio-dir /snap/android-studio/current/android-studio" resulted with the flutter doctor: john@Desktop:~$ flutter doctor --android-licenses Could not find the Android Studio installation at the manually configured path "/snap/android-studio/current/android-studio".

So I tried "flutter config --android-studio-dir /snap/android-studio/current" and that gave: john@Desktop:~$ 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.

So I did "sudo apt install android-sdk" to resolve that but still getting same error. What do I do now?

PS I've looked in the Android Studio menu for an SDK Manager entry but don't see one.

Here is "flutter doctor - v" output: john@Desktop:~$ flutter doctor -v [✓] Flutter (Channel stable, 3.24.3, on Ubuntu 24.04.1 LTS 6.8.0-40-generic, locale en_GB.UTF-8) • Flutter version 3.24.3 on channel stable at /home/john/snap/flutter/common/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2663184aa7 (5 weeks ago), 2024-09-11 16:27:48 -0500 • Engine revision 36335019a8 • Dart version 3.5.3 • DevTools version 2.37.3

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) • Android SDK at /home/john/Android/Sdk ✗ 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/to/linux-android-setup for more details.

[✓] Chrome - develop for the web • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop • clang version 10.0.0-4ubuntu1 • cmake version 3.16.3 • ninja version 1.10.0 • pkg-config version 0.29.1

[✓] Android Studio (version 2024.1) • Android Studio at /snap/android-studio/161 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)

[!] Android Studio (version unknown) • Android Studio at /snap/android-studio/current • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart ✗ Unable to determine Android Studio version. • android-studio-dir = /snap/android-studio/current • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)

[✓] Connected device (2 available) • Linux (desktop) • linux • linux-x64 • Ubuntu 24.04.1 LTS 6.8.0-40-generic • Chrome (web) • chrome • web-javascript • Google Chrome 130.0.6723.58

[✓] Network resources • All expected network resources are available.

! Doctor found issues in 2 categories.

John Rose
  • 1,083

2 Answers2

3

It looks like you may have incorrectly done:

flutter config --android-studio-dir /snap/android-studio/current/

When you should have done:

flutter config --android-studio-dir /snap/android-studio/current/android-studio

Then flutter doctor --android-licenses

Can you please flutter doctor --android-licenses -vv and paste the output to https://paste.debian.net/ then provide the link in your question.

popey
  • 24,549
0

I used config to set Android Studio Path & Android SDK Path. I was then able to accept the licenses, ignoring the Warning about XML. The Doctor gave a Warning about the Android Studio Version, which I hope doesn't matter:

john@Desktop:~$ flutter config --android-studio-dir="/snap/android-studio/current"
Setting "android-studio-dir" value to "/snap/android-studio/current".
john@Desktop:~$ flutter config --android-studio-dir="/snap/android-studio/current"
Setting "android-studio-dir" value to "/snap/android-studio/current".
john@Desktop:~$ flutter doctor --android-licenses
Warning: Errors during XML parse:                                               
Warning: Additionally, the fallback loader failed to parse the XML.
john@Desktop:~$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.4, on Ubuntu 24.04.1 LTS 6.8.0-40-generic,
    locale en_GB.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2024.1)
[!] Android Studio (version unknown)
    ✗ Unable to determine Android Studio version.
[✓] VS Code (version 1.94.2)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 1 category.

John Rose
  • 1,083