【问题标题】:Intellij idea showing error: could not create the java virtual machineIntellij idea 显示错误:无法创建 java 虚拟机
【发布时间】:2026-01-31 15:20:11
【问题描述】:

我在使用intellij idea ide 时遇到问题。 它工作正常,但突然开始显示错误:

Android Dex: [untitled3] Error: Could not create the Java Virtual Machine.
Android Dex: [untitled3] Error: A fatal exception has occurred. Program will exit.

我已经检查了我的 sdk、jdk 路径。 我已经完成了re-installing,但问题还是一样。 任何帮助,将不胜感激。

谢谢。

【问题讨论】:

    标签: android intellij-idea jvm fatal-error dex


    【解决方案1】:

    试试这个:

    导航到 C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.3\bin 并运行“ide​​a64.exe”。

    如果没有为您的产品提供 64 位可执行文件 使用 .bat 文件而不是 .exe 启动 IDE

    【讨论】:

      【解决方案2】:

      javac 可能在 32 位模式下运行,防止使用大于 2**32 字节的堆。

      Try adding -d64 to the “Additional compiler process VM options” 在设置中或通过 Ctrl-Shift-A/⇧⌘A

      【讨论】:

        【解决方案3】:

        问题是由于 DX 编译器的堆大小太大导致的,it can be changed here (File | Settings | Compiler | Android DX Compiler)。

        Check this document 解释了为什么在使用 32 位 JDK 时会发生这种情况。

        【讨论】:

          最近更新 更多