I'm trying to run a LibGDX project with the iOS configuration but I keep running into the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ios:launchIPhoneSimulator'.
> java.lang.OutOfMemoryError: GC overhead limit exceeded
I've tried modifying the gradlew file with the following params, but I still get the same error:
DEFAULT_JVM_OPTS="-Xmx2048m -XX:+UseConcMarkSweepGC"
Any ideas what else I can do to work around this issue? Thanks!
Tried several different things (gradlew clean, removing the dependencies and downloading them again, increasing heap size all the way to 2g, etc), but eventually what fixed it was rebooting the machine.
Yeah, a reboot fixed it. Weird.
I had the same problem... but I was found the solution! Open your "gradle.properties" file and it must be something like this:
org.gradle.daemon=true
org.gradle.jvmargs=-Xms128m -Xmx512m
org.gradle.configureondemand=true
You must to edit the second string! Change "-Xms128m" to "-Xms1024m", "-Xmx512m" to "-Xmx4096m" and "gradle.properties" in final must look like:
org.gradle.daemon=true
org.gradle.jvmargs=-Xms1024m -Xmx4096m
org.gradle.configureondemand=true
That's it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With