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

查看:64
本文介绍了更新 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 -> Preferences -> Build, Execution, Deployment -> Compiler 做到了这一点.这似乎工作正常,直到我重新启动 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.vmoptions28/01/2017 14:04:43.629 studio[1003]: fullFileName 存在:/Applications/Android Studio.app/Contents/bin/studio.vmoptions28/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.vmoptions28/01/2017 14:04:43.629 工作室 [1003]:完成 28/01/2017 14:04:43.629studio[1003]:处理 VMOptions 文件在/Users/lesormonde/Library/Preferences/AndroidStudio2.2/studio.vmoptions28/01/2017 14:04:43.629 工作室 [1003]:完成 28/01/2017 14:04:43.629studio[1003]:在 28/01/2017 14:04:43.631 处理 VMOptions 文件工作室 [1003]:未找到内容 28/01/2017 14:04:43.637 工作室 [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.vmoptions 是

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天全站免登陆