2021年4月6日星期二

Unity 3D - VR / CommandInvokationFailure: Gradle build failed

Since I'm having this error for four month when I try to build an android VR app, I tried everything. I've changed JDK file but nothing works for me.

Please help me...

Here's the message I always get.

CommandInvokationFailure: Gradle build failed. /Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/bin/java -classpath "/Users/jade/Documents/Unity/2019.4.22f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[ Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong: Could not create service of type ExecutionHistoryStore using ExecutionServices.createExecutionHistoryStore().

Timeout waiting to lock execution history cache (/Volumes/Jade/Unity/EscapeRoom/Temp/gradleOut/.gradle/5.1.1/executionHistory). It is currently in use by another Gradle instance. Owner PID: unknown Our PID: 55399 Owner Operation: unknown Our operation: Lock file: /Volumes/Jade/Unity/EscapeRoom/Temp/gradleOut/.gradle/5.1.1/executionHistory/executionHistory.lock

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================

2: Task failed with an exception.

  • What went wrong: Could not create service of type ExecutionHistoryStore using ExecutionServices.createExecutionHistoryStore().

Timeout waiting to lock execution history cache (/Volumes/Jade/Unity/EscapeRoom/Temp/gradleOut/.gradle/5.1.1/executionHistory). It is currently in use by another Gradle instance. Owner PID: unknown Our PID: 55399 Owner Operation: unknown Our operation: Lock file: /Volumes/Jade/Unity/EscapeRoom/Temp/gradleOut/.gradle/5.1.1/executionHistory/executionHistory.lock

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================

  • Get more help at https://help.gradle.org

BUILD FAILED in 4m 13s ] stdout[ Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details ] 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.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0) UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1[T] progress) (at :0) Rethrow as GradleInvokationException: Gradle build failed UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, 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) Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at :0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:353) UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

https://stackoverflow.com/questions/66978970/unity-3d-vr-commandinvokationfailure-gradle-build-failed April 07, 2021 at 10:55AM

没有评论:

发表评论