Error occurred during initialization of VM解决方法
问题描述:
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/4.4/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 1572864KB object heap
如图:
解决方法:点击file->project structure…->SDK Location 选择打钩Use embedded JDK(recomment),问题解决。
这个问题是因为你没有使用系统自带的jre,因为你要求的为jre分配的内存空间太大,而你自己的jre本身又没有这么大的内存,所以会出现这种问题,下面的解决方案是让你使用系统自带的虚拟机。
也可以使用下面的方式:
修改给jre分配的内存大小,使他的值减小