Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FLutter Android toolchain issue, JDK version Issue, version change issue

Hey I am getting an issue regarding flutter JDK version issue. Somehow I changed that when I upgraded my jdk to version-21, But there I got many issues regarding this update. and Now I have installed the jdk v-20, and have changed the env variables as well. But still my android studio not working!

Tried- Reinstalling flutter/android studio/jdk

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0) X Cannot execute C:\Program Files\Java\jdk-21\bin\java to determine the version

While I am getting this in my cmd - C:\Users\User>echo %JAVA_HOME% C:\Program Files\Java\jdk-20

and I have tried every thig literally everything but I am struck here. enter image description here

have a look this is my env variable enter image description here

Jdk path enter image description here

enter image description here

I Just want that that this X Cannot execute C:\Program Files\Java\jdk-21\bin\java to determine the version

to be changed to my jdk-20

I appreciate any help reguarding this.

like image 784
Sumit Kumar Ravi Avatar asked Nov 07 '25 06:11

Sumit Kumar Ravi


1 Answers

try this and replace the path to a jdk like version 17 or less flutter config --jdk-dir "C:\Program Files\Java\jdk-11". I heard the latest jdk is not yet compatible with many latest gradle and flutter versions, although android studio comes with them by default

like image 50
pumpkin Avatar answered Nov 09 '25 00:11

pumpkin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!