Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

X Cannot execute C:\Program Files\Java\jdk-16\bin\bin\java to determine the version

Tags:

flutter

  [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\jan03\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Java\jdk-16\bin\server\bin\java
    X Cannot execute C:\Program Files\Java\jdk-16\bin\server\bin\java to determine the version

  • java version :- 16.0 jdk
  • android studio version :- 4.2.1
  • flutter version:- 2.2.1
like image 905
Minky Tiny Avatar asked Jun 16 '26 23:06

Minky Tiny


2 Answers

What you have to do is, simply run the command

flutter config --jdk-dir "C:\Program Files\Java\jdk-<version>"

Then, run command

flutter doctor --android-licenses

like image 125
Waseem Akram Avatar answered Jun 18 '26 22:06

Waseem Akram


Go to C:\Program Files\Android\Android Studio, then copy the contents of jbr and paste the contents into the jre folder. It solve both problem

  • Cannot execute C:\Program Files\Java\jdk-19\bin\bin\java to determine the version
  • unable to find bundled java version
like image 23
Bhatti Shb Avatar answered Jun 18 '26 23:06

Bhatti Shb