简体   繁体   中英

android studio 4.0 cannot load jdk class

I updated Android Studio to latest version (4.0) and i am getting the following error

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 Files\Java\jre1.8-0_221 i get the error message as seen in the image.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM