How to increase memory for gradle builds

How can I increase the memory for Gradle?

When I build one of the messages that appear says:

To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 1364 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html

Can you try editing this file?

Perhaps we could use something like org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m in that file?

1 Like

Thanks!

I was including a new template folder for my project because I changed a few things of the main activity and manifest to be able to use Deep Links. I’ll copy that folder now.