Android - Error occurred during initialization of VM

摘要:Android - Error occurred during initialization of VM

這發生在Android Studio

http://stackoverflow.com/questions/16712413/an-error-when-creating-new-project-in-android-studio

 

不知道為什麼,我用我的筆電,執行專案時,發生了這個問題。

查一查,只有這個能夠解,

發生了類似以下的問題

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.6/userguide/gradle_daemon.html
Please read below 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.

雖然解答沒被打勾,

卻真的解了我的問題

Start Android Studio, close any open project.

On the right side, click on Configure -> Settings.

On the left side, in Compiler->Gradle set VM Options to "-Xmx512m" (without quotes)