gradle编译无法初始化jvm问题

用gradle编译ionic程序时,报以下错误:
Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.12/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
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://docs.gradle.org/current/userguide/build_environment.html

你可能感兴趣的:(Android)