I recently installed android studio on a Mactop pro running OSX 10.11. with the standard Apple JRE/JDK.
I had some problems with the slowness of the IDE and the fact that the emulator was hanging. After doing some research I was advised to set VM options as follows -Xmx2048m -XX:MaxPermSize=512 I did this using using Android -> Preferences -> Build, Execution, Deployment -> Compiler. This seemed to work ok until I restarted android studio.
Now, every attempt to start android studio now results in this error (from the console log).
28/01/2017 14:04:43.617 studio[1003]: allVms required 1.8*,1.8+ 28/01/2017 14:04:43.628 studio[1003]: fullFileName is: /Applications/Android Studio.app/Contents/bin/studio.vmoptions 28/01/2017 14:04:43.629 studio[1003]: fullFileName exists: /Applications/Android Studio.app/Contents/bin/studio.vmoptions 28/01/2017 14:04:43.629 studio[1003]: Value of STUDIO_VM_OPTIONS is (null) 28/01/2017 14:04:43.629 studio[1003]: Processing VMOptions file at /Applications/Android Studio.app/Contents/bin/studio.vmoptions 28/01/2017 14:04:43.629 studio[1003]: Done 28/01/2017 14:04:43.629 studio[1003]: Processing VMOptions file at /Users/lesormonde/Library/Preferences/AndroidStudio2.2/studio.vmoptions 28/01/2017 14:04:43.629 studio[1003]: Done 28/01/2017 14:04:43.629 studio[1003]: Processing VMOptions file at 28/01/2017 14:04:43.631 studio[1003]: No content found 28/01/2017 14:04:43.637 studio[1003]: JNI_CreateJavaVM (/Applications/Android Studio.app/Contents/jre/jdk) failed: 4294967290
The contents of the file /Applications/Android Studio.app/Contents/bin/studio.vmoptions are
-Xms256m
-Xmx1280m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOopslesormondesMBP2:bin
A reinstall of android studio has had no effect. I thought to remove any relevant options files, but there are none at ~/Library/Preferences/androidstudio2.2/ which is where the documentation tells you to look and various disk searches haven't produced anything helpful
I am currently dead in the water. Any help would be much appreciated.
My solution was to press [Win] + Tab and then choose Android Studio on half of the screen so that it readjusts. Finally, I maximized it and it opened it in the correct screen. This happened to me, too.
vmoptions file, located in the bin/ directory inside your Android Studio installation folder. Note that you should never directly edit the studio.
I found the vmoptions file in ~/Library/preferences/AndroidStudio2.2 Deleting the vmoptions file resolved the problem. Begs the question of why Android Studio allowed me to save options that had that effect.
According to http://tools.android.com/tech-docs/configuration you need to set the environment variable STUDIO_VM_OPTIONS
to where your vmoptions
file is located (even though it says you should add the variable if you put your vmoptions
file elsewhere).
On my windows machine I set the variable to %USERPROFILE%\.AndroidStudio2.2\studio64.exe.vmoptions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With