Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio create new project error [duplicate]

Tags:

android

I have created many projects without any problem but today i keep getting the following error when I create a new one

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

Any ideas about what is wrong?

like image 750
Giannis Avatar asked Sep 22 '16 18:09

Giannis


1 Answers

You encounter following error:

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

This means the JVM hasn't enough memory space. Adding following property in the gradle.properties file will fix your problem:

org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m
like image 159
Fleur Avatar answered Oct 04 '22 18:10

Fleur