Visual Studio 2015 RC & Cordova: Could not reserve

2019-06-13 05:08发布

问题:

Environment

  • VS 14.0.22823.1 D14REL

  • jdk1.7.0_55 32 bit which comes with current Android SDK

  • Windows 8.1

Problem:

  • Create new Project of type "Appache Cordova Apps", leave default name "BlankCordovApp3"
  • Build the app with default settings: Works fine
  • Doubleclick config.xml; the config editor opens; goto "platforms" and change Cordova CLI to "5.0.0."
  • Rebuild solution it several times and/or select "Clean Solution"
  • Error message: "Error occurred during initialization of VM; Could not reserve enough space for object heap"

回答1:

Solution:

  • Do not change any JVM arguments, there is a reason for the Cordova scripts to use those settings of minimum an maximum heap size.
  • In my case: C:\Program Files\Java\jdk1.8.0_31
  • Instead, use a 64 bit JDK and either set it to the PATH environment variable (Control Panel => Environment Variables) or in VS goto "Tools => Options => Tools for Apache Cordova => Environment Variable Overrides"
  • Clean and/or rebuild solution
  • Solved the problem for me
  • Don't know what the exact problem is. I'm new to Cordova. Could be a size limitation of a 32 bit JVM on Windows 8.1 or the daemon process which does not correctly free memory after several runs.