So I have a problem with memory allocation. Sometimes it works, and sometimes it doesn\'t. I\'ve read this thread and tried the advice there multiple times. Sometimes
I got the same error in Visual Studio 2015 with cordova 5.1.1 under Windows 10.
To solve the issue, set this environment variable:
_JAVA_OPTIONS=-Xmx512M
This Article point me in the right direction. I did change the instructions a littel bit, so they fits to Windows 10.
Hope it helps someone!