3

First I get error is android license status unknown .So I reinstall again. they thrown two error like the picture below. So how i go to fix it.

[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.19041.867], locale
    en-US)
    • Flutter version 1.12.13+hotfix.8 at C:\src\flutter
    • Framework revision 0b8abb4724 (1 year, 2 months ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\SCS\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Java\jdk-15.0.2\bin\java
    • Java version Java(TM) SE Runtime Environment (build 15.0.2+7-27)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup      for detailed instructions.

[!] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio2
    • Flutter plugin version 49.0.1
    • Dart plugin version 192.8052
    X Unable to determine bundled Java version.
    • Try updating or re-installing Android Studio.

[√] VS Code (version 1.55.0)
    • VS Code at C:\Users\SCS\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[√] Connected device (1 available)
    • INE LX2 • JUC4C18801000395 • android-arm64 • Android 9 (API 28)

    ``` 
Siew Lin
  • 33
  • 1
  • 1
  • 5
  • Does this answer your question? [Unable to find bundled Java version on Flutter](https://stackoverflow.com/questions/51281702/unable-to-find-bundled-java-version-on-flutter) – EricSchaefer Apr 07 '21 at 11:30
  • 1
    not ,i see this post yesterday and try .Still cannot – Siew Lin Apr 07 '21 at 11:43
  • https://stackoverflow.com/questions/51281702/unable-to-find-bundled-java-version-on-flutter?rq=1 This is a perfect answer... and has helped alot of people.. check it out – Jerin Aug 05 '21 at 17:43

3 Answers3

3

I think you should specify the path to your Java SDK in Android Studio, you can set it by doing the following:

Generally speaking, it is set in the "Project Structure" dialog.

Go to File > Project Structure > SDK Location. The third field is "JDK Location" where you can set it. This will set it for the current project.

How to set Java SDK path in AndroidStudio?

3

try setting a symbol to jdk, like this

cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
Jorge Paiz
  • 506
  • 3
  • 8
1

Follow steps to resolve in M1 chip version

 ~ % cd /Applications/Android\ Studio.app/Contents/jre
jre % ln -s ../jre jdk
jre % ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
jre % flutter doctor -v

Terminal output screenshot

enter image description here

Aniruddh Parihar
  • 3,072
  • 3
  • 21
  • 39
  • solving my problem, thanks. but now i get Android Licenses error. running flutter doctor --android-licenses Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema – hafidzaini Aug 21 '21 at 11:51
  • solved, android-licenses error Exception by installing Android SDK Command-line Tools (latest) – hafidzaini Aug 21 '21 at 11:58