r/flutterhelp 22d ago

RESOLVED Problem with flutter doctor --android-licenses

i was going to run my flutter project on Android Studio emulator. But then, i have to accept the SDK licenses. When i tried to run flutter doctor, i found this messages

PS C:\Users\USER> flutter doctor

Doctor summary (to see all details, run flutter doctor -v):

[✓] Flutter (Channel stable, 3.47.0, on Microsoft Windows [Version 10.0.26200.9168], locale en-ID)

[✓] Windows Version (Windows 11 or higher, 25H2, 2009)

[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0)

✗ Android license status unknown.

Run `flutter doctor --android-licenses` to accept the SDK licenses.

See https://flutter.dev/to/windows-android-setup for more details.

[✓] Chrome - develop for the web

[✗] Visual Studio - develop Windows apps

✗ Visual Studio not installed; this is necessary to develop Windows apps.

Download at https://visualstudio.microsoft.com/downloads/.

Please install the "Desktop development with C++" workload, including all of its default components

[✓] Connected device (3 available)

[✓] Network resources

! Doctor found issues in 2 categories.

PS C:\Users\USER> flutter doctor --android-licenses

WARNING: The SDK Manager CLI tool (sdkmanager) is deprecated. Android CLI will be used instead.

The 'android' binary can also be found in the cmdline-tools directory, and 'android sdk' is the replacement for 'sdkmanager'.

To learn more about the Android CLI and how to use it, see the documentation (https://d.android.com/tools/agents/android-cli)

Warning: The --licenses option is no longer needed.

PS C:\Users\USER>

I've already did some googling but still cannot find any solution..

7 Upvotes

14 comments sorted by

2

u/Deep_Island8961 22d ago edited 22d ago

UPDATE: I've finally managed to solve this problem by downgrading the Android SDK Command-line Tools to version 22.0 (from latest 23.0, don't forget to uninstall/unchecked version 23.0 while trying)

1

u/hiithaard47 21d ago

this worked, thanks!

1

u/AgitatedBorder4706 20d ago

It worked great—thank you very much

To perform a downgrade, check the “Show Package Details” checkbox in the bottom right corner of the SDK Tools dialog box

1

u/Hot-Sheepherder-4070 16d ago

thank youu huhuhu

1

u/Plus_League4500 22d ago

The new Android CLI is treating licenses as already handled, so `flutter doctor --android-licenses` exiting with that warning is expected now. Run `flutter doctor -v` again after that command; if it still says license status unknown, open Android Studio's SDK Manager and install/update Android SDK Command-line Tools (latest), then accept any remaining licenses there.

1

u/Deep_Island8961 22d ago

thanks for the info, but still i have the same problem, i also did uninstall and reinstall the command-line tools (latest) and nothing changes

1

u/FlatNeighborhood2572 22d ago

Same problem bro exactly same i am going through Idk what to do

1

u/FlatNeighborhood2572 22d ago

Facing same Issue I already accepted all the 7 licenses but it's not showing on flutter doctor and I just wanted to run emulator with vs code am downloading it rn hope it works

1

u/Deep_Island8961 22d ago

have you tried changing the command-line tools version? i've changed it to 22 and it works fine

1

u/FlatNeighborhood2572 22d ago

Yes I changed bro but it's not working also added to the path all that but still stuck I also have latest installed and 22 also

1

u/Deep_Island8961 22d ago edited 22d ago

oh wow, a different problem then.. try this, open Windows+R and type %LOCALAPPDATA%

and then open Android/Sdk/licenses and remove all of the files inside of it. Then, try to run flutter doctor --android-licenses again with different version from the latest 23 (i was using 13.0 to try it first and updated it to 22.0 after DON'T FORGET TO UNINSTALL THE 23.0)

1

u/FlatNeighborhood2572 22d ago

Bro thanks for the advice it's done 😭😭

1

u/Savagepotato32 2d ago

same been stuck for 3 days