更新VM选项后无法启动Android Studio [英] Android studio won't start after updating vm options

查看:596
本文介绍了更新VM选项后无法启动Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在运行OSX 10.11的Mactop Pro上安装了android studio.使用标准的Apple JRE/JDK.

I recently installed android studio on a Mactop pro running OSX 10.11. with the standard Apple JRE/JDK.

我对IDE的运行速度以及模拟器挂起的事实有一些疑问.在进行了一些研究之后,建议我如下设置VM选项-Xmx2048m -XX:MaxPermSize = 512我使用Android->首选项->构建,执行,部署->编译器进行了此操作.在我重新启动android studio之前,这似乎可以正常工作.

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.

现在,每次尝试启动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需要1.8 *,1.8 + 28/01/2017 14:04:43.628 studio [1003]:fullFileName是:/Applications/Android Studio.app/Contents/bin/studio.vmoptions 28/01/2017 14:04:43.629 studio [1003]:fullFileName存在: /Applications/Android Studio.app/Contents/bin/studio.vmoptions 28/01/2017 14:04:43.629 studio [1003]:STUDIO_VM_OPTIONS的值为 (空)28/01/2017 14:04:43.629 studio [1003]:处理VMOptions文件 在/Applications/Android Studio.app/Contents/bin/studio.vmoptions中 28/01/2017 14:04:43.629 studio [1003]:完成28/01/2017 14:04:43.629 studio [1003]:在以下位置处理VMOptions文件 /Users/lesormonde/Library/Preferences/AndroidStudio2.2/studio.vmoptions 28/01/2017 14:04:43.629 studio [1003]:完成28/01/2017 14:04:43.629 studio [1003]:在28/01/2017 14:04:43.631处理VMOptions文件 studio [1003]:找不到内容28/01/2017 14:04:43.637 studio [1003]: JNI_CreateJavaVM(/Applications/Android Studio.app/Contents/jre/jdk) 失败:4294967290

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

文件内容 /Applications/Android Studio.app/Contents/bin/studio.vm选项为

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

重新安装android studio无效. 我本想删除任何相关的选项文件,但是〜/Library/Preferences/androidstudio2.2/上没有任何相关文件,在该文件中,文档会告诉您查看并且各种磁盘搜索都没有产生任何帮助

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.

推荐答案

我在〜/Library/preferences/AndroidStudio2.2中找到了vmoptions文件 删除vmoptions文件可解决此问题. 提出了一个问题,为什么Android 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.

这篇关于更新VM选项后无法启动Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆