When I try to update android studio to version: Arctix Fox | 2020.3.0
i get this error
Java 11 or newer is required to run the IDE, Please contact support at https://code.google.com/p/android/issues Your JRE: 1.8.0_301-b09x86 (Oracle Coporation) C:\Program Files (x86)\Java\jdk1.8.0_301\jre
Please note that i already have both installed even tho when i try to remove the old version 1.8 i get the same error.
JAVA_HOME is set to: C:\Program Files\Java\jdk-11.0.12
and when i check java version in cmd using
openjdk 11.0.12 2021-07-20 OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7) OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)
if i delete folder jdk1.8.0_301 in path C:\Program Files (x86)\Java
i get this error:
Failed to load JVM DLL C:\Program Files\Java\jdk-11.0.12\bin\jvm.dll if you already have 32-bit JDK insalled, define a JAVA_HOME variablee in Computer > System Properties > System Settings > Environment Variables.
After removing all old versions than restarting pc and downloading and installing version JRE – 27 MB .msi, the error msg is gone when i try to open android studio but i got this new message says :
Cannot load a JDK class: com.sun.jdi.Field Please ensure you run the IDE on JDK rather than JRE.
Also i have noticed the new JAVA_HOME path is set to
C:\Program Files (x86)\AdoptOpenJDK\jre-126.96.36.199-hotspot\
and when i try to change it to
C:\Program Files (x86)\Java\jdk-11.0.12
i get the same old error:
Failed to load JVM DLL C:\Program
eventually i had to install new windows, after that all i had to do was to install android studio first before i install java or setup any environment and download fresh new SDK now everything works fine
Answered By – Hossam Hassan
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0