Solution 1 :
JAVA_HOME variable value must be the JDK location.
Android supports only Java 7 or 8.
Kindly set the JAVA_HOME to Java 8 (Download if you don’t have it)
Refer these posts for further info:
I updated Android Studio to latest version (4.0) and i am getting the following error
I tried to to follow this question but did not get any proper idea as to what to do.
I tried to set the
JAVA_PATH to latest jdk 14 from oracle site but that results in android studio not starting at all, it doesn’t even give any error message, but when i add the path as
C:Program FilesJavajre1.8-0_221 i get the error message as seen in the image.
Comment posted by adoptopenjdk.net/?variant=openjdk8&jvmVariant=hotspot
Thank you, this helped me ! I installed openJDK 8 from this link