0

I was following this tutorial to use the Google Calendar API: https://developers.google.com/calendar/quickstart/java and I had to run this command:

gradle init --type basic

When I did, I received this error:

Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.

I found in this question, Android Studio Gradle project "Unable to start the daemon process /initialization of VM", that the answer was to add this line to the end of the gradle.properties file:

org.gradle.jvmargs=-Xmx1024m

However, it gave me an error because I already had that property set, but to a different value, like so:

org.gradle.jvmargs=-Xmx1536m

I reran the gradle command without error and I was able to continue.

This question was answered almost 4 years ago. My project is new this week. Why would I have to use an older version in order for this to work? Also, what exactly is happening when I switch the value of org.gradle.jvmargs to another value?

Michael
  • 3,093
  • 7
  • 39
  • 83

1 Answers1

0

this setting controls the size of heap memory, which is available to the Gradle daemon

meanwhile 1024M is the default (at times of that answer 512M might have been the default).

I have a project, which demands 5084M to build. it ordinary complains when it's too less

... at least when setting option -XX:+HeapDumpOnOutOfMemoryError.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216