'Why I cant open Android Studio after changing VMOptions

Recently I changed the VMOptions on my Android Studio trying to free some RAM memory. Happens that I wrote and saved the command with an error and now I cant open Android Studio..

I tried to reinstall AS, delete studio64.vmoptions file at bin folder, but still cant open Android Studio. Can someone help me with that?

The studio.bat command clearly shows the error that i wrote in VMOptions, but I cant find and change that line Error in VMOptions that I wrote



Solution 1:[1]

Referencing to this question: How to reset Android Studio

On Mac OS X

Remove these directories:

~/Library/Application\ Support/AndroidStudio*
~/Library/Preferences/AndroidStudio*
~/Library/Caches/AndroidStudio*
~/Library/Logs/AndroidStudio*
~/.AndroidStudio*

On Windows:

Go to your User Folder - on Windows 7/8 this would be:

[SYSDRIVE]:\Users\[your username] (ex. C:\Users\JohnDoe\)

In this folder there should be a folder called .AndroidStudioBeta or .AndroidStudio (notice the period at the start - so on some OSes it would be hidden).

Delete this folder (or better yet, move it to a backup location - so you can return it if something goes wrong).

This should reset your Android Studio settings to default.

Solution 2:[2]

Wanted to give you a long answer but there is a whole page about configuration so here you go. Find the .vmoptions file and edit it.

The .vmoptions file located in the path: C:\Users\yourPCuserName\AppData\Roaming\Google\AndroidStudio4.2

Edit that file and change -Xms and -Xmx value like below:

-Xms =256m
-Xmx=768m

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NiklasLehnfeld
Solution 2 Pir Fahim Shah