Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio : Failed to create JVM error code : -1

Please dont mark it as duplicate.

I did make changes as per other answers available when error code was -4. Now it is showing error code : -1.

Kindly give me some direction.

here is my studio.exe.vmoptions file

 server
-Xms256m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-da
-Djna.nosys=true
-Djna.boot.library.path=

-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-Didea.paths.selector=AndroidStudio2.1
-Didea.platform.prefix=AndroidStudio
like image 803
Bhavita Lalwani Avatar asked Jun 08 '16 18:06

Bhavita Lalwani


1 Answers

Had the same problem, this was my solution:

  1. go to C:\Users\ *username* \\.androidStudio\ (your path might be a bit different, but make sure to go the local version of Android Studio, not the general version (that lives in the Program Files directory)),
  2. find the studio.exe.vmoptions (or studio64.exe.vmoptions) file and delete it.
  3. try to open Android Studio again.
like image 99
Aryeh Avatar answered Sep 27 '22 18:09

Aryeh