Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Gradle project sync failed

Tags:

I'm getting error: "Gradle project sync failed. Basic functionality (e.g. eiditing) will not work properly."

And Error Log:

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/1.10/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. 

I was trying to delete .gradle folder as I read here. This worked yesterday but today when I started Android Studio the error showed again and deleting .gradle folder doesn't help.

I realy don't know what to do.

Does anyone have any suggestions?

like image 763
Stepan Sanda Avatar asked May 14 '14 19:05

Stepan Sanda


2 Answers

Just a blind guess: try to add something like this to your gradle.properties file in the project:

org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m 
like image 127
Prizoff Avatar answered Dec 09 '22 04:12

Prizoff


Same issue solve in Android studio by

File -> Settings -> Compiler (Gradle-based Android Projects)

Change the "**VM options**" to  -Xmx512m -XX:MaxPermSize=512m 

It worked for me .

like image 45
Jagadish Avatar answered Dec 09 '22 05:12

Jagadish