java - Android Studio - 无法识别的 VM 选项 'MaxPermSize=256m'

标签 java android android-studio

我刚刚在 Elementary OS 0.3 Freya 上安装了 Android Studio 并使用终端运行它。然而,在我第一次启动时,显示了一条错误消息:

Gradle 'Test' project refresh failed

Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html Please read the following process output to find out more:

Unrecognized VM option 'MaxPermSize=256m' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

我读了this并尝试了所有方法来解决它但无济于事。我确实注意到他的错误与我的有些不同,并认为这可能是我无法使用建议的方法解决问题的原因。

当我在终端上执行 .sh 文件时,它打印出:

Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0

(java:5094): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"

Gtk-Message: Failed to load module "canberra-gtk-module"

我不确定它是否与错误有关。请帮忙。

最佳答案

在我的例子中,我有一条线

org.gradle.jvmargs=-Xmx6408m -XX:MaxPermSize=6408m -XX:+HeapDumpOnOutOfMemoryError

在我的项目结构中的 gradle.properties 文件中。

从该文件中删除 -XX:MaxPermSize=6408m 修复了一个问题

关于java - Android Studio - 无法识别的 VM 选项 'MaxPermSize=256m',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31411989/

相关文章:

java - 将模块添加到我的 Android 应用程序时出现 DuplicateFileException

Android Button 背景无法识别/使用可绘制对象

android-studio - Flutter/Dart 自动完成功能适用于 VS Code,但不适用于 Android Studio

java - 从 Android 网站获取信息

php - 将 android 设备连接到 SqlServer 2005 时出现 JSON 解析错误

Java Joda 时间 夏令时

android - 将 Realm 对象转换为 Parcelable 时出错

java - OnClickListener 适用于 ArrayList 中的最后一个元素

java - Oracle xdb-xmlparser 源代码

java - JAVA中 "while loop"之后输出不一致