PhotoEditor SDK: java.lang.OutOfMemoryError

112 Views Asked by At

6 hours invested at this point into this SDK. Followed the ionic guide carefully at: https://github.com/imgly/pesdk-ionic-demo

after everything is in place I enter cordova build android. It then hangs for a while at :mergeDebugResources leading to an error soon after

java.lang.OutOfMemoryError: Java heap space
:mergeDebugResources FAILED

I've tried setting my environment settings (windows 10) to -Xmx512m and even -Xmx2048m without any difference.

Uninstall Java 32bit and reinstall 64 bit

The moment I remove the pesdk-cordova-demo plugin, its business as usual. Add it back and it hangs at the same point again.

I have 12GB of ram on my computer. java version "1.8.0_152". Cordova 7.1.0. Ionic 3.19.0

running Cordova android 5.1.1

Any ideas?

1

There are 1 best solutions below

0
On

Finally found a solution! Environment variable did the trick

GRADLE_OPTS=-Xmx2048m

Only after a restart did it take effect.