0

I am trying to make a Minecraft mod. I have set the gradle.properties to use 3GB of ram. If I do this it is able to load the daemon process however it immediately displays

Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3072000KB object heap

It is running out of RAM, and I have no idea why as I have 16GB installed.

I tried closing all other programs but got the same problem. Next up I changed the gradle.properties to use 1GB and then 2GB of RAM, and instead just got an error saying it ran out of memory (I googled this error and the common solution was to give it some more RAM) * What went wrong: Execution failed for task ':decompileMc'. > Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_211\bin\java.exe'' finished with non-zero exit value 1

Francisco Mateo recommended I update my gradle version - sadly didn't help.

I tried changing the distributionUrl in the gradle-wrapper.properties to the new version of gradle I am using so it now reads distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip I also tried running InteliJ as administrator. Still no luck.

Not a clue what is happening here - help appreciated. If it makes any difference the error occures at 10:08 of https://www.youtube.com/watch?v=RZ66HdNkank

Tim
  • 125
  • 2
  • 8
  • I don’t have a direct answer other than try upgrading the version of Gradle. Currently the latest is 5.5.1. The error you posted is at 2.14 which is well over 3 years old. Newer version of Gradle offer significantly faster run times and optimizations. See https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper – Cisco Jul 13 '19 at 21:21
  • I tried this but the same error occurs – Tim Jul 13 '19 at 21:41
  • I have also tried changing the distributionUrl in the gradle-wrapper.properties to the new version of gradle I am using so it now reads distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip I also tried running InteliJ as administrator. Still no luck. – Tim Jul 14 '19 at 07:57
  • `Could not reserve enough space for 3072000KB object heap` Verify that there is enough free RAM available in your OS. Check that you did not specify too big number in Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Gradle | *Gradle VM options*. Check also https://stackoverflow.com/questions/26143740/getting-gradle-error-could-not-reserve-enough-space-for-object-heap-constantly – Andrey Jul 15 '19 at 12:11
  • Andrey - Did you read what I said? I have 16GB of ram, and had tried closing all other applications so my RAM usage was only at 20%. I have now tried this on my laptop which has 8GB of RAM and the same issue occurred. – Tim Jul 21 '19 at 09:25

0 Answers0