0

I have downloaded the SDK command-line tools in Android Studio from SDK manager and then tried to run 'flutter doctor --android-licenses` in command line prompt in Windows 11. Yet the licenses do not get automatically downloaded and I get the below error in cmd:-

enter image description here

I also do have an issue in Android Studio as "[!] Android Studio (version 2022.1) X Unable to find bundled Java version." Does this affect it?

And I did try re-installing Android Studio once.

1 Answers1

0

Are you using the latest Android Studio(2022.1.1(Electric Eel))?

There is a change with Java location as the latest Android Studio uses jbr and not jre.

There are a number of fixes such as https://github.com/flutter/flutter/issues/118502

or https://youtu.be/INk__TbhdAE

Milie
  • 374
  • 1
  • 6
  • 22
  • Yes I'm using the latest Android Studio (Electric Eel | 2022.1.1) – Piyush Sharma Jan 30 '23 at 05:22
  • I've actually done that and it fixed the error:- "[!] Android Studio (version 2022.1) X Unable to find bundled Java version" but not the other error with android licenses – Piyush Sharma Feb 02 '23 at 12:45
  • Try flutter doctor --android-licenses again otherwise you will have to install the relevant SDK tools in the SDK manager. You can follow these answers for more in-depth assistance: https://stackoverflow.com/questions/48604914/flutter-run-error-you-have-not-accepted-the-license-agreements – Milie Feb 03 '23 at 13:36