Android Studio创建新项目错误

时间:2016-09-22 18:17:55

标签: android

我已经创建了很多项目而没有任何问题,但是今天我在创建一个新项目时仍然遇到以下错误

Gradle 'MyApplication' project refresh failed
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 https://docs.gradle.org/2.14.1/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

关于什么是错的任何想法?

1 个答案:

答案 0 :(得分:24)

您遇到以下错误:

  

VM初始化期间发生错误无法保留足够的内容   1572864KB对象堆的空间

这意味着JVM没有足够的内存空间。 在gradle.properties文件中添加以下属性将解决您的问题:

org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m