Reputation: 313
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?
Upvotes: 9
Views: 23879
Reputation: 978
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
Upvotes: 21
Reputation: 672
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.
Upvotes: 1
Reputation: 3496
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.
Upvotes: 6