Java.lang.outofmemoryerror (no error message)/Unable to find EOCD signature

Hi, building of my app for Quest 2 stops with “java.lang.outofmemoryerror (no error message)”. I’ve tried to delete Intermediate, change -Xmx in gradle.properties in project, didn’t help. Any ideas?

After several reboots I’ve caught “Unable to find EOCD signature”. I’m starting to hate android development. How can I fix that?

For me,when I try to package the game with an obb file larger than 2GB inside the apk file cause the error“java.lang.outofmemoryerror (no error message)” ,just let the obb file outside.even if you devide data to chunks to paks to 2 obb files,The package option "Package obb inside apk"will just handle the main obb but not the patch one.
“Unable to find EOCD signature” can be fixed easily by AndroidStudio-clean project or just delete Intermediate-Android and build the project.(you may not able us AS to clean the project when the editor is still running.
gradle.properties is program generated and copied to gradle project when use ue package,you cant just simply edit the gradle.properties and try to use ue package.

2 Likes

Sometimes last builds obb file may be left in stagebuild folder will trigger this ierror.
This error caused by java cant deal with files larger than about 2GB with native method caused by javas int range.

2 Likes

@Suriba How to solve this then? I do get the JAVA Heap Space Error when I check the option “Generate AAB Bundle”.

Is there a solution to date to allow gradle to compress a 4gb apk, as you stated i also tried splitting main.obb and patch.obb but only main.obb is included into the apk and larger single obb over 2gb just gives compression error.