Intellij idea showing error: could not create the java virtual machine

hemantsb picture hemantsb · Aug 7, 2013 · Viewed 15.7k times · Source

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.

Answer

CrazyCoder picture CrazyCoder · Aug 7, 2013

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.