2016-09-22 25 views
5

我創造了許多項目,當我創建什麼是錯的一個新Android Studio中創建一個沒有我不斷收到以下錯誤的問題,但今天的新項目錯誤

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

按照此[鏈接](http://stackoverflow.com/questions/25009717/android-studio-gradle-project-unable-to -start最守護進程-initializatio)。它會解決你的問題。 –

回答

24

您遇到以下錯誤:

Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap

這意味着JVM沒有足夠的存儲空間。 添加在gradle.properties文件下列屬性將解決您的問題:

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

正確答案! – Julian

+0

謝謝@Fleur – Julian

+1

首先感謝您的幫助。當我添加這個和它的作品org.gradle.jvmargs = -Xmx156m -XX:MaxPermSize = 512m。但似乎我必須編輯gradle.properties文件,每當我創建一個新的項目原因,當我創建一個新的項目,它有這個值org.gradle.jvmargs = -Xmx1536m。我可以永久編輯文件,所以我不必每次都編輯它? – Giannis

相關問題