gradle编译ionic程序时,报以下错误:

  1.  
    Error:Unable to start the daemon process.
  2.  
    This problem might be caused by incorrect configuration of the daemon.
  3.  
    For example, an unrecognized jvm option is used.
  4.  
    Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.12/userguide/gradle_daemon.html
  5.  
    Please read below process output to find out more:
  6.  
    ———————–
  7.  
    Error occurred during initialization of VM
  8.  
    Could not reserve enough space for object heap
  9.  
    Error: Could not create the Java Virtual Machine.
  10.  
    Error: A fatal exception has occurred. Program will exit

解决方案

在个人文件夹( (C:\Users\username\.gradle 或 ~\.gradle))下创建gradle.properties文件,添加

org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=256m

注:可根据自己的需要设置jvm参数-Xmx的大小

本文转载自:https://blog.csdn.net/xujinfu2/article/details/50505251/