Flutter Doctor - Unable to determine bundled Java version
Solution 1
Execute these commands one by one and it resolved my issue in MAC .
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
Solution 2
Please ensure Java is in your PATH
and that JAVA_HOME
is defined and pointing to the JDK
. I've had Windows put the JRE
in the path instead of the JDK, which leads to all kinds of issues.
Please take a look at your PATH environment variable
and remove everything Java related that does not point to the JDK folder
.
Oracle has some documentation on how to do this here : Installing Java and setting JAVA_HOME.
I hope I was able to help you.
Solution 3
Just to add, I had 2 versions of Android studio. And I removed one. So there might be a possibility that you have an older/another version of Android Studio present in your machine.
Bata
17 Year old software engineering student. Currently maining C++.
Updated on July 28, 2022Comments
-
Bata almost 2 years
I actually didn't want to install Android Studio to use flutter, so i just installed the Android SDK Command Line Tools.
The thing is, when i run flutter doctor i get the following warning.
And when i create a new project i get this one.
I am able to create and compile flutter projects without any issues, it is only the warning that worries me. Could it cause dependency trouble in the future for java related packages?