1. 程式人生 > >Android Studio沒有足夠空間啟動JVM

Android Studio沒有足夠空間啟動JVM

Android Studio Error:Unable to start the daemon process. This problem might be caused by incorrect c……

最近在寫一個小專案的時候,上一次開啟工程還是好好的,再次開啟的時候就報錯

ActionBarActivity,View 全部識別不了。

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

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.

解決辦法:

1 定位到目錄 C:\Users\Administrator.gradle

2 建立檔案gradle.properties

內容:org.gradle.jvmargs=-Xmx512m

3 重啟你的Android Studio專案

親測有用!