I saw a video on Youtube for enhancing the performance of Android Studio. I did and now I can't launch my Android Studio. Now it gives an error saying that "If you already have a 64-bit JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings Environment Variables. Failed to create JVM. JVM Path C:\Program Files\Android\Android Studio\jre\jre"
I searched the whole internet and tried every solution mentioned but I still get the "define JAVA_HOME variable" error. I tried both completely uninstalling the Android Studio with all files and related folders manually deleted but still get this error and Android Studio just won't simply run. I have exams in a few days and I have a lot to practice.
Edit:
I just removed the JAVA_HOME. I have both the JDK and JVM installed. I am just uninstalling and installing Android Studio at the moment.
Edit 2:
To set JAVA_HOME, do the following: Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.
JAVA_HOME is an operating system (OS) environment variable which can optionally be set after either the Java Development Kit (JDK) or the Java Runtime Environment (JRE) is installed. The JAVA_HOME environment variable points to the file system location where the JDK or JRE was installed.
PATH values: notice how the directory we set for JAVA_HOME is the JDK installation root whereas for PATH we add the bin directory within the JDK installation. Take care to set these up correctly otherwise you'll have problems later on.
Okay, so I found an answer after spending 5 hours fixing\setting Environment Variables (JAVA_HOME), uninstalling and reinstalling both the JDK and Android Studio.
The answer was simple. For any version of Android Studio that is >version 4.0, you need to remove the "studio.exe.vmoptions" or "studio64.exe.vmoptions" (depending on your system) from the directory "C:\Users{Your Username}\AppData\Roaming\Google{Android Studio Version}".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With