Reputation: 903
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
Upvotes: 5
Views: 7423
Reputation: 35
For those that are using the Android studio version 4, can find the studio64.exe.vmoptions in the following path: C:\Users\YourUserName\AppData\Roaming\Google\AndroidStudio4.1
as mentioned here in the official documentation of Android: https://developer.android.com/studio/intro/studio-config
Upvotes: 0
Reputation: 1667
And for those who just edited their .vmoptions
and messed it up, this is where that file is (according to this documentation):
Both configuration files are stored in the configuration folder for Android Studio. The name of the folder depends on your Studio version. 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
Upvotes: 0
Reputation: 1
Worked for me. If you have done some changes in the local files namely studio.exe.vmoptions or studio64.exe.vmoptions using wordpad (which i had done after reading some other solutions on google but they didn't worked for me ), then first undo those changes.
Upvotes: 0
Reputation: 31
Go in C drive and go to user ex: "C:\Users\vijay" and shift + delete all android and android studio folders. Then click and open Android studio. that's it.
Upvotes: 0
Reputation: 351
It worked for me, like said Aryeh in above answer.
C:\Users\(myself)\.AndroidStudio2.2
and deleted the file studio64.exe.vmoptions
( I did a copy before, with prefix OLD_, using a text editor ),Upvotes: 3
Reputation: 336
Had the same problem, this was my solution:
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)),studio.exe.vmoptions
(or studio64.exe.vmoptions
) file and delete it.Upvotes: 30