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

Please do not put it as a duplicate.

I made changes according to other answers if the error code was -4. Now it shows the error code: -1.

Please 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
+5
source share
5 answers

Had the same problem, this was my solution:

  • go to C:\Users\ *username* \\.androidStudio\(your path may be a little different, but be sure to select the local version of Android Studio, not the general version (which lives in the Program Files folder)),
  • find the file studio.exe.vmoptions(or studio64.exe.vmoptions) and delete it.
  • Android Studio.
+27

, Aryeh .

  • C:\Users\(myself)\.AndroidStudio2.2 studio64.exe.vmoptions ( OLD_, ),
  • Android Studio,
  • AS "a > VM..." ( "studio64.exe.vmoptions", ).
+3

C ex: "C:\Users\vijay" + Android Android. Android. .

0

. , studio.exe.vmoptions studio64.exe.vmoptions, wordpad ( Google, ), .

0

And for those who have just edited their own .vmoptionsand messed it up, here is where this file is located (according to this documentation ):

Both configuration files are stored in the configuration folder for Android Studio. The name of the folder depends on the version of your studio. For example, Android Studio 3.3 has the folder name AndroidStudio3.3. The location of this folder depends on your operating system:

Windows: %USERPROFILE%\.CONFIGURATION_FOLDER
macOS: ~/Library/Preferences/CONFIGURATION_FOLDER
Linux: ~/.CONFIGURATION_FOLDER
0
source

All Articles