10

I am having trouble with intellij idea ide. It was working fine , but suddenly it started showing error:

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

I have checked my sdk, jdk path. i have done re-installing it but still the problem is same. Any help would be appreciated.

Thanks.

hemantsb
  • 2,049
  • 2
  • 20
  • 29

3 Answers3

10

The problem was caused by the too high heap size for the DX compiler, it can be changed here (File | Settings | Compiler | Android DX Compiler).

Check this document that explains why it happens when 32-bit JDK is used.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
3

try this:

navigate to C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.3\bin and run the " idea64.exe ".

if 64-bit executable is not provided for your product Start the IDE using .bat file instead of the .exe

akashrajkn
  • 2,295
  • 2
  • 21
  • 47
0

javac may be running in 32-bit mode, preventing the use of heaps greater than 2**32 bytes.

Try adding -d64 to the “Additional compiler process VM options” in settings or via Ctrl-Shift-A/⇧⌘A

Community
  • 1
  • 1
andrewdotn
  • 32,721
  • 10
  • 101
  • 130