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:
https://jakewharton.com/androids-java-9-10-11-and-12-support/
https://developer.android.com/studio/write/java8-support
Problem :
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.
Comments
Comment posted by adoptopenjdk.net/?variant=openjdk8&jvmVariant=hotspot
Thank you, this helped me ! I installed openJDK 8 from this link