Forum Discussion
jeffrobernard
7 years agoHonored Guest
Java Heap Space Issue
Hello,
I have a Oculus Go .apk thats about 800mb. It builds but at the last moment throws an error i've not come across in Unity. i've seen this issue raised up in Unity forums, but no definitive answer on who to fix it. I have 3 scenes. One basic landing scene, then two 360 Videos. I've built this app plenty of times to gear vr, revived it for the Oculus go and now I'm running into this problem. Is there a way to bump up the memory? Below is the error. Any help in resolving this is greatly appreciated.
CommandInvokationFailure: Gradle build failed.
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/Hub/Editor/2018.1.0f2/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':packageRelease'.
> Java heap space
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 13s
]
stdout[
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:prepareOVRPluginLibrary
:prepareReleaseDependencies
:compileReleaseAidl UP-TO-DATE
:compileReleaseRenderscript UP-TO-DATE
:generateReleaseBuildConfig UP-TO-DATE
:generateReleaseResValues UP-TO-DATE
:generateReleaseResources UP-TO-DATE
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:javaPreCompileRelease
:compileReleaseJavaWithJavac UP-TO-DATE
:compileReleaseNdk NO-SOURCE
:compileReleaseSources UP-TO-DATE
:lintVitalRelease
:mergeReleaseShaders UP-TO-DATE
:compileReleaseShaders UP-TO-DATE
:generateReleaseAssets UP-TO-DATE
:mergeReleaseAssets
:transformClassesWithDexForRelease
:mergeReleaseJniLibFolders UP-TO-DATE
:transformNativeLibsWithMergeJniLibsForRelease
:transformNativeLibsWithStripDebugSymbolForRelease UP-TO-DATE
:processReleaseJavaRes NO-SOURCE
:transformResourcesWithMergeJavaResForRelease
:validateSigningRelease
:packageRelease FAILED
24 actionable tasks: 14 executed, 10 up-to-date
]
exit code: 1
UnityEditor
I have a Oculus Go .apk thats about 800mb. It builds but at the last moment throws an error i've not come across in Unity. i've seen this issue raised up in Unity forums, but no definitive answer on who to fix it. I have 3 scenes. One basic landing scene, then two 360 Videos. I've built this app plenty of times to gear vr, revived it for the Oculus go and now I'm running into this problem. Is there a way to bump up the memory? Below is the error. Any help in resolving this is greatly appreciated.
CommandInvokationFailure: Gradle build failed.
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/Hub/Editor/2018.1.0f2/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':packageRelease'.
> Java heap space
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 13s
]
stdout[
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:prepareOVRPluginLibrary
:prepareReleaseDependencies
:compileReleaseAidl UP-TO-DATE
:compileReleaseRenderscript UP-TO-DATE
:generateReleaseBuildConfig UP-TO-DATE
:generateReleaseResValues UP-TO-DATE
:generateReleaseResources UP-TO-DATE
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:javaPreCompileRelease
:compileReleaseJavaWithJavac UP-TO-DATE
:compileReleaseNdk NO-SOURCE
:compileReleaseSources UP-TO-DATE
:lintVitalRelease
:mergeReleaseShaders UP-TO-DATE
:compileReleaseShaders UP-TO-DATE
:generateReleaseAssets UP-TO-DATE
:mergeReleaseAssets
:transformClassesWithDexForRelease
:mergeReleaseJniLibFolders UP-TO-DATE
:transformNativeLibsWithMergeJniLibsForRelease
:transformNativeLibsWithStripDebugSymbolForRelease UP-TO-DATE
:processReleaseJavaRes NO-SOURCE
:transformResourcesWithMergeJavaResForRelease
:validateSigningRelease
:packageRelease FAILED
24 actionable tasks: 14 executed, 10 up-to-date
]
exit code: 1
UnityEditor
3 Replies
Replies have been turned off for this discussion
- mouse_bearRetired Support@jeffrobernard
Thank you for reaching out. I've replied to the ticket that you've submitted, but I'd like to reply here as well to provide a resource.
The root of the error from your logs stems from this issue: Execution failed for task ':packageRelease'.
There are a few things we can try to solve/diagnose this issue:
- Try changing the destination folder to one which you have admin/write access to when building your APK.
- Ensure you're logged into a Windows account with administrator rights prior to generating a build.
- If all else fails, switch the Build System from "Gradle" to "Internal" prior to generating a build.
Let us know if any of these work for you. - FuzzyOnionProtegeSame issue, looking for a solution please!
- eman_vrHonored GuestSet the java heap space memory to 8046 or more by going to Edit->Prefferences->External tools-> Maximum JVM memory
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 months ago
- 1 year ago
- 8 years ago
- 1 year ago