Android Gradle Could not reserve enough space for object heap

For Android Studio 1.3 : (Method 1)

Step 1 : Open file in your Android Studio project.

Step 2 : Add this line at the end of the file

org.gradle.jvmargs=-XX:MaxHeapSize=256m -Xmx256m

Above methods seems to work but if in case it won’t then do this (Method 2)

Step 1 : Start Android studio and close any open project (File > Close Project).

Step 2 : On Welcome window, Go to Configure > Settings.

Step 3 : Go to Build, Execution, Deployment > Compiler

Step 4 : Change Build process heap size (Mbytes) to 1024 and Additional build process to VM Options to -Xmx512m.

Step 5 : Close or Restart Android Studio.

SOLVED - Andriod Studio 1.3 Gradle Could not reserve enough space for object heap Issue

in, you can even delete


such lines or comment them out. Let android studio decide for it. When I ran into this same problem, none of above solutions worked for me. Commenting out this line in helped in solving that error.

I tried several solutions, nothing seemed to work. Setting my system JDK to match Android Studio’s solved the problem.

Ensure your system java

java -version

Is the same as Androids

File > Project Structure > JDK Location

Leave a Comment