5

I am working with flutter and the cmd shows that I have an error when I try to run flutter doctor

This is the cmd's results :

   [[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18362.476], locale en-US)
    
    [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
    [!] Android Studio (version 3.3)
        X Unable to determine bundled Java version.
    [√] Android Studio (version 3.5)
    [√] VS Code (version 1.40.1)
    [√] Connected device (1 available)
Omar Sherif
  • 649
  • 9
  • 26
Lola
  • 61
  • 1
  • 3

1 Answers1

1

Two issues from your log here. First, to enable the Android SDK you have to read/accept license agreements. You need to do: flutter doctor --android-licenses in terminal (or equiv if not Mac) and then follow the prompts to sign the licenses.

If you haven't set up the Flutter SDK, you can follow the instructions here (step 3 shows how to enable Flutter permanently in your path which I strongly recommend. This will allow you to run Flutter commands such as flutter clean, flutter doctor, etc.).

For the second issue, this is usually a problem with an outdated Android Studio implementation. You can try to delete and re-install Android Studio, or see if you can upgrade it: Android Studio/Check for Updates.

Oprimus
  • 1,652
  • 3
  • 11
  • 20
  • I have fixed the first issue, but the java issue is still on even tho I updated AndroidStudio and re-installed it – Lola Nov 26 '19 at 08:46
  • I still have this error : Unable to determine bundled Java version..which I don't know why even tho I have re-installed android studio and my java SDK – Lola Nov 27 '19 at 14:07
  • Try following the Android Studio/JDK support here: http://tools.android.com/tech-docs/configuration/osx-jdk – Oprimus Nov 27 '19 at 23:22
  • In my case `flutter doctor --android-licenses` gives a bunch of Java errors and I'd done the Android Studio/Check for Updates just an hour or two ago. – hippietrail Jun 25 '21 at 02:49
  • @hippietrail you need to install `Android SDK Command-line Tools (latest)` from Android SDK > SDK Tools – Shift 'n Tab Jun 29 '21 at 19:52
  • I'm almost try all possible solution but nothing work. Only this one work for me. Its from `August 9, 2021` Check the link for the solution https://stackoverflow.com/a/68703869/8555332 – Tahmid Bin Rashid Aug 08 '21 at 20:12