Android的工作室 - 虚拟机无法识别选项'MaxPermSize参数=256米“ [英] Android Studio - Unrecognized VM option 'MaxPermSize=256m'

查看:668
本文介绍了Android的工作室 - 虚拟机无法识别选项'MaxPermSize参数=256米“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚安装了Android的工作室上小学OS 0.3芙蕾雅和使用的终端运行它。我第一次启动时,然而,有显示错误消息:

I just installed Android Studio on Elementary OS 0.3 Freya and run it using the terminal. On my first start-up, however, there's an error message shown:

摇篮测试项目刷新失败

无法启动守护进程。
这个问题可能是由后台程序的配置不正确引起。
例如,无法识别的JVM选项使用。
请参考上守护进程在用户指南章在http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
请阅读下面的过程输出,以了解更多:

VM无法识别选项'MaxPermSize参数=256米
错误:无法创建Java虚拟机。
错误:发生了致命的异常。计划将退出。

我读<一个href=\"http://stackoverflow.com/questions/27704587/gradle-project-sync-failed-basic-functionalitye-g-editing-debugging-will-not\">this并试过所有的解决这个问题,但无济于事的方式。我也注意到,他的错误是从我的有所不同,并认为这可能是为什么我不能用解决方式我的问题建议。

I read this and tried all the ways to solve it but to no avail. I did notice that his error was somewhat different from mine and thought that might be why I couldn't solve my problem using the ways suggested.

当我执行我的终端上sh文件,它印:

As I executed the .sh file on my terminal, it printed:

的HotSpot的Java(TM)服务器VM警告:忽略选项MaxPermSize参数=250米;支持8.0辗转

(Java:5094):GTK的WARNING **:无法找到主题引擎在module_path中:像素图

GTK的消息:无法加载模块堪培拉GTK模块

我不知道是否它的相关的错误与否。请帮助。

I'm not sure whether it's related to the error or not. Please help.

推荐答案

由于这是在这个线程已经说了,的永久代在Java的8 ,这是你的情况下使用删除。我认为,最简单的解决方法是程序执行过程中,除去与常驻代相关的参数。

As it was already said in this thread, Permanent Generation was removed in Java 8, which is used in your case. I think, the easiest solution is to remove parameters associated with Permanent Generation during program execution.

转到您有Android Studio中的目录。然后去斌/ 子目录。找到下列文件,其中包含Java虚拟机选项:

Go to the directory where you have Android Studio. Then go to the bin/ subdirectory. Locate the following files, which contains Java Virtual Machine options:


  • studio.vmoptions

  • studio64.vmoptions

  • studio.vmoptions
  • studio64.vmoptions

打开这些文件并找到 MaxPerSize 参数行。它看起来应该如下:

Open these files and locate line with MaxPerSize parameter. It should look as follows:

XX:MaxPermSize参数=256米

删除这两个文件中这一行。我不知道,如果你使用的是32位或64位的操作系统,这样你就可以以防万一更新这两个文件。

Remove this line in both files. I don't know if you are using 32-bit or 64-bit operating system, so you can update both files just in case.

我不知道这是否会解决您的问题,但我会尝试在这样的情况下。在我的情况下,此选项和Java 8,我只是得到了警告,但Android的工作室开始反正。删除此参数之后,Android的工作室仍会启动,但没有报警。我使用Ubuntu LTS 14.04

I'm not sure if it will solve your problem, but I would try it in such situation. In my case, with this option and Java 8, I just get the warning, but Android Studio starts anyway. After removing this parameter, Android Studio still starts, but without warning. I'm using Ubuntu 14.04 LTS.

修改

有对此处描述这个问题的另一种解决方案: http://stackoverflow.com/a/27913562/1150795

There is another solution for this problem described here: http://stackoverflow.com/a/27913562/1150795.

转到文件>其他设置>默认项目结构> JDK位置并检查路径。

在Ubuntu Linux操作系统的情况下,我们可以设置 / usr / lib目录/ JVM / Java的7甲骨文默认JDK,如果我们使用的是Oracle JVM。 JDK 7是Android最安全的选择。

In case of Ubuntu Linux, we can set /usr/lib/jvm/java-7-oracle as default JDK if we are using Oracle JVM. JDK 7 is the safest option for Android.

这篇关于Android的工作室 - 虚拟机无法识别选项'MaxPermSize参数=256米“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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