1. 程式人生 > >AndroidStudio無法啟動Gradle守護程序

AndroidStudio無法啟動Gradle守護程序

Android Studio+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/1.8/userguide/gradle_daemon.html


Please read below process output to find out more:

在stackoverflow上找到解決方法:
Android Studio預設為Gradle daemon process分配的heap size過大(windows平臺下預設最大heap size為:75% of total physical memory up to 1 GB),所以容易造成空間不足無法啟動的問題。把空間配置稍小一點即可。
在Android Studio中進入

File->Settings->Compiler

將VM Options配置為一個較小的值,如-Xmx512m。
重啟Android Studio問題解決。