今天运行命令:grails run-app 出现如下错误:

| Error Error initializing classpath: 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 https://docs.gradle.org/2.9/userguide/gradle_daemon.html

Please read the following 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.

(Use --stacktrace to see the full trace)




错误原因分析:
1、看错误信息是没有足够的内存来启动java VM。
2、打开任务管理器一看,电脑内存已经使用了百分之70多。
3、我的电脑已经几天没有关过机了。。。


解决方法:
1、关掉其它占用内容的进程或重启电脑即可。