eduardo2207 eduardo2207 - 4 months ago 57
Android Question

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

Answer

Try to add this code to your build.gradle:

dexOptions {
        javaMaxHeapSize "2048M"//2GB or more
}

If it didn't help use this answer or this.