3

Error:Unable to start the daemon process: could not reserve enough space for object heap.

Please assign more memory to Gradle in the project's gradle.properties file.

For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB:

org.gradle.jvmargs=-Xmx1024m</em>

Read Gradle's configuration guide

Read about Java's heap siz

Bruce
  • 1,647
  • 4
  • 20
  • 22
Jennings
  • 506
  • 2
  • 9
  • 22

3 Answers3

7

Try this one.

Add this line at the end of your application gradle.properties

org.gradle.jvmargs=-Xmx512m -XX\:MaxPermSize\=512m
Vishwa
  • 1,112
  • 1
  • 11
  • 23
2

I had multiple JDK installed in my system. JDK 1.7 and JDK 1.8.

And Android Studio was using JDK 1.7. Changing to 1.8 Solved the Issue for me.

Steps I did:

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 > Java Compiler

Step 4 : Change the Project bytecode version to the highest (currently 1.8).

Step 5 : Close and Restart Android Studio.

0

Close Android Studio, go to its install directory, usually "C:\Program Files\Android\Android Studio\bin," open "studio.exe.vmoptions" with Notepad and change the following lines: -Xms256m -Xmx750m to: -Xms512m -Xmx1024m

restart computer.