Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Eco-Editor · May 02, 2019 at 09:49 AM · android buildjavaspacerandomlyheap

Grade build fail: Heap size

Can anyone please explain to me why my grade build is failing randomly - sometimes its a success, other time it fails, in the SAME scene... What triggers this random behavior?

I have improved my heap space to 2GB already: alt text

This is the error:

CommandInvokationFailure: Gradle build failed. C:\Program Files\Android\Android Studio\jre\bin\java.exe -classpath "D:\ProgramFiles\Unity\Hub\Editor\2018.1.2f1\Editor\Data\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 49s ] stdout[ NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Nimrod\AppData\Local\Android\Sdk\ndk-bundle. If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

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 :prepareCore110Library :prepareVuforiaWrapperLibrary :prepareReleaseDependencies :compileReleaseAidl UP-TO-DATE :compileReleaseRenderscript UP-TO-DATE :generateReleaseBuildConfig UP-TO-DATE :generateReleaseResValues UP-TO-DATE :generateReleaseResources UP-TO-DATE :mergeReleaseResources UP-TO-DATE :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 UP-TO-DATE :mergeReleaseJniLibFolders UP-TO-DATE :transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE :processReleaseJavaRes NO-SOURCE :transformResourcesWithMergeJavaResForRelease UP-TO-DATE :validateSigningRelease :packageRelease FAILED 24 actionable tasks: 11 executed, 13 up-to-date ] exit code: 1 UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0) > UnityEditor.Android.Command.Run > (System.Diagnostics.ProcessStartInfo > psi, > UnityEditor.Android.Command+WaitingForProcessToExit > waitingForProcessToExit, System.String > errorMsg) (at > :0) > UnityEditor.Android.AndroidJavaTools.RunJava > (System.String args, System.String > workingdir, System.Action`1[T] > progress, System.String error) (at > :0) > UnityEditor.Android.GradleWrapper.Run > (System.String workingdir, > System.String task, System.Action`1[T] > progress) (at > :0) > Rethrow as GradleInvokationException: > Gradle build failed > UnityEditor.Android.GradleWrapper.Run > (System.String workingdir, > System.String task, System.Action`1[T] > progress) (at > :0) > UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute > (UnityEditor.Android.PostProcessor.PostProcessorContext > context) (at > :0) > UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks > (UnityEditor.Android.PostProcessor.PostProcessorContext > context) (at > :0)

as-vm.png (12.9 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

108 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

First time open error android game 0 Answers

How to make Unity find JDK on my linux machine. 1 Answer

One Signal dependecies issue 0 Answers

Unity and Android. How yo manage build pipelines? 1 Answer

How to expand UnityPlayerActivity java source file?,How to expand UnityPlayerActivity? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges