Java – Android Studio – Java JVM

Android Studio – Java JVM… here is a solution to the problem.

Android Studio – Java JVM

I

downloaded the latest version of Android Studio, but I can’t use it.
The following message appears:

Failed to create JVM: error code -4

JVM Path: C:\Program Files\Java\jdk1.7.0_45\jre

If you already have a 32-bit JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables

But I’ve set JAVA_HOME to

C:\Program Files\Java\jdk1.7.0_45

Add to the end of path:

; C:\Program Files\Java\jdk1.7.0_45\bin

Java debugging

java version “1.7.0_45”

Java(TM) SE Runtime Environment (build 1.7.0_45-b18)

Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)

What’s wrong?

Solution

You need to edit your vmoptions file (in my case it is located in C:\Program Files\Android\android-studio\bin\studio.exe.vmoptions), open it with a text editor and reduce -Xmx and -XX:PermSize (change -Xmx512m to -Xmx256m, replace -XX: MaxPermSize=250m changes to -XX:MaxPermSize=128m). Save and restart the IDE.

Related Problems and Solutions