Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Java Heap Space Issue

jeffrobernardjeffrobernard Posts: 5
NerveGear
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
Tagged:

Comments

  • NinjaGGNinjaGG Posts: 230 Oculus Staff
    @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.
    If you need immediate help or want additional support/context on an issue you are having with our platform or integrations:

    1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
    2. Please submit a ticket here (include what you've gathered in step 1).
    3. Tag me @NinjaGaijin once you have done so!
  • FuzzyOnionFuzzyOnion Posts: 2
    NerveGear
    Same issue, looking for a solution please!
  • emanInsilicoemanInsilico Posts: 1
    NerveGear
    Set the java heap space memory to 8046 or more by going to Edit->Prefferences->External tools-> Maximum JVM memory 
Sign In or Register to comment.