0

Please assign more memory to Gradle. For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB: org.gradle.jvmargs=-Xmx1024m

Eduardo Herrera
  • 79
  • 1
  • 15

1 Answers1

1

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.

Community
  • 1
  • 1
Volodymyr Kulyk
  • 6,455
  • 3
  • 36
  • 63
  • @ito2307 have you looked at [this](http://stackoverflow.com/a/31760855/3226984) answer? – Volodymyr Kulyk Mar 31 '16 at 14:42
  • Mate i changed to 1024 and -Xmx256m and still saying 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 and i follow step by step your link. – Eduardo Herrera Mar 31 '16 at 15:02
  • @ito2307 hm, how about [this](http://stackoverflow.com/a/31960033/3226984). Try it! – Volodymyr Kulyk Mar 31 '16 at 15:05
  • org.gradle.jvmargs=-Xmx512m -XX\:MaxPermSize\=512m – Eduardo Herrera Mar 31 '16 at 15:34
  • @ito2307 I glad it helped you. – Volodymyr Kulyk Mar 31 '16 at 15:39