Build fails after Daemon error

Error occurred during initialization of VM: Could not reserve enough space for 1.6GB object heap.

Is there a workaround?

Ed T

One thing you can try is to define the heap size for Gradle.

To do this:

  1. Create this file: C:\Users\yourname\.gradle\gradle.properties
  2. Add the following line:
    org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m
  3. Close SAB, reopen and try and build again.
2 Likes

Thank you, Richard. That worked. Now SAB is able to build my app again.

I had to bump mine up above 256 for some reason. 512 worked fine for me. 300 gave me some warnings about running out of memory, but it was still successful.