关于Studio报错Error occurred during initialization of VM,解决方法

1,报错日志

Error:Failed to complete Gradle execution.

Cause:
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.8/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.

,,

解决措施:

1,在C:\Users\Administrator\.gradle路径下创建文件gradle.properties(注:格式为properties)

2,文件中输入org.gradle.jvmargs=-Xmx512m

3,保存,重新运行即可。

(注:若上述路径下存在gradle.properties此文件,看内容,添加第二步内容即可)

发布了4 篇原创文章 · 获赞 15 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/zpjsmalltime/article/details/50730383