今天啟動eclipse后,昨天運行正常的gradle項目報錯,無法進行編譯,錯誤信息如下:
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 http://gradle.org/docs/2.2.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 object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Could not fetch model of type 'EclipseProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-bin.zip'.
按照字面意思,貌似內存不足,所有需要配置gradle內存,步驟如下
1、定位到目錄 C:\Users\<username>\.gradle
2、創建文件gradle.properties ;內容:org.gradle.jvmargs=-Xmx512m
3、保存后重啟eclipse就可以進行正常編譯