When I run flutter create x or flutter doctor I get the following message
"Unable to find any JVMs matching version 1.8
.
I also tried following another thread on StackOverFlow for this issue but it did not help because it did not specify what to do if you already have java installed. At the moment when I run java-version I get the following message:
java version 13.0.1
2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
Thank you in advance for the help!
EDIT: I found a solution!
echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 1.7)" >> ~/.bash_profile
All I did was replace 1.7 with a JDK I already had installed and now it works. The thread can be found below: