Error: Unable to start daemon process:
Error: Failed to start daemon process: Failed to reserve enough space for the object heap.
Assign more memory to Gradle in your project file gradle.properties
.
For example, the following line in the file gradle.properties
sets the maximum Java heap size to 1024 bytes:
org.gradle.jvmargs=-Xmx1024m</em>
Read the Gradle Configuration Guide
Read about Java heap siz
source to share
I had several JDKs installed on my system. JDK 1.7 and JDK 1.8.
And Android Studio was using JDK 1.7. Upgrading to 1.8 Solved the problem for me.
Steps I took:
Step 1: Start Android Studio and close any open project (File> Close Project).
Step 2: In the welcome window, select "Preferences"> "Preferences".
Step 3. Go to Build, Run, Deploy> Compiler> Java Compiler
Step 4: Change the project bytecode version to the highest (currently 1.8).
Step 5: Close and restart Android Studio.
source to share