Saturday, November 12, 2016

Android Studio Not Starting jvm error code -4

So the other day I got the following message when I tried to launch Android Studio

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 

Solution

Go to the file studio.exe.vmoptions in your bin folder inside android studio installation (Usually it isC:\Program Files\Android\Android Studio\bin\)
Open the above file with notepad. some times it will not be editable so give administrative permission and change the following attributes:
-Xmx512m to -Xmx256m
-XX:MaxPermSize=250m to -XX:MaxPermSize=128m
Or change:
-Xmx750m to -Xmx512m
-XX:MaxPermSize=350m to -XX:MaxPermSize=250m

I don't know the reason of why it works (would be glad if somebody could)
Source : http://stackoverflow.com/questions/33094132/failed-to-create-jvm-error-code-4-android-studio

No comments:

Post a Comment