Unity Oculus Android build fails.to launch Daemon



我教室里的学生正在使用Unity为Oculus Go构建应用程序。我可以毫无问题地构建到设备,但某些权限设置阻止学生构建。他们收到此错误。我认为安全设置阻止了 gradle 启动另一个线程。我对实际的构建过程不够熟悉,无法理解这一点。任何建议,将不胜感激。他们有一些非常酷的项目,并准备测试传送和其他交互。

CommandInvokationFailure: Gradle build failed. 
C:Program FilesUnityEditorDataPlaybackEnginesAndroidPlayer/ToolsOpenJDKWindowsbinjava.exe -classpath "C:Program FilesUnityEditorDataPlaybackEnginesAndroidPlayerToolsgradlelibgradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleDebug"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeDebugResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
* 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 5s
]
stdout[
:checkDebugClasspath
:preBuild UP-TO-DATE
:preDebugBuild
:compileDebugAidl NO-SOURCE
:compileDebugRenderscript
:checkDebugManifest
:generateDebugBuildConfig
:prepareLintJar
:mainApkListPersistenceDebug
:generateDebugResValues
:generateDebugResources
:mergeDebugResources FAILED
9 actionable tasks: 9 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <177bc8179be6497489c4b5b319f290d7>: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 <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>: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 <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>: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 <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <177bc8179be6497489c4b5b319f290d7>: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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

您需要安装 Windows 通用 C 运行时库。

你可以在这里找到它:https://support.microsoft.com/en-gb/help/2999226/update-for-universal-c-runtime-in-windows

目前正在与 Unity 合作开发 Oculus Quest,并经历了几个陷阱 ;°( 首先,检查安卓版本(需要安卓R26(

  • 对我来说,最好的工作流程是通过Unity的Hub安装android SDK。它很好地隐藏在"下载存档"页面中,您要下载/更新的版本附近有一个"中心"按钮,您可以从中选择Android JDK,下面是NDK广告SDK的两个附加复选框。
  • 使用"构建
  • 设置"窗口中的"构建"或"构建并运行",至少 *.apk 保存在磁盘上,而不是 CRTL+B 的情况!
  • 在这里,构建操作仍然无法在设备上写入(仅当应用程序已经在我这边被删除时才有效(。
  • 然后,您可以在终端窗口中使用"adb install"命令部署应用程序。

相关内容

  • 没有找到相关文章

最新更新