I am using Android studio 1.3.1 and getting this failed to sync Gradle project error :
Error:Unable to start the daemon process: could not reserve enough spa
in my case, if you use firebase with this dependency:
com.google.firebase:firebase-firestore-ktx:21.4.2
it will make Error:Unable to start the daemon process: could not reserve enough space for object heap
so you have to erase ktx:
com.google.firebase:firebase-firestore:21.4.2
try this way
Open gradle.properties file.
add this line at the end:
org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m
or
org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m
Method 1 :
For Android Studio 1.3 :
Step 1 : Open gradle.properties 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.
org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m
Add this Line to the End of the gradle.properties file in Your project.
remember without '#'..