Unity无法在Mac上导出Android项目

时间:2018-04-29 15:18:02

标签: android macos unity3d build

我正在尝试在Mac计算机上将Unity项目导出到Android,但是遇到了这个例外:

  

ExitGUIException:类型'UnityEngine.ExitGUIException'的异常   被扔了。       UnityEngine.GUIUtility.ExitGUI()(在/Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUIUtility.cs:152)       UnityEditor.Android.AndroidSdkRoot.Browse(System.String sdkPath)       UnityEditor.Android.AndroidSDKTools.GetInstance()       UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute(UnityEditor.Android.PostProcessor.PostProcessorContext context)       UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTask​​s(UnityEditor.Android.PostProcessor.PostProcessorContext context)       UnityEditor.Android.PostProcessAndroidPlayer.PrepareForBuild(BuildOptions选项,BuildTarget目标)       UnityEditor.Android.AndroidBuildPostprocessor.PrepareForBuild(BuildOptions选项,BuildTarget目标)       UnityEditor.PostprocessBuildPlayer.PrepareForBuild(BuildOptions选项,BuildTargetGroup targetGroup,BuildTarget目标)(at   /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:87)       UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)

它似乎不是来自我的项目代码和C#项目正确构建。我缺少什么?

1 个答案:

答案 0 :(得分:0)

出于某些奇怪的原因,Unity并未告诉您Android SDK路径未配置,而是提供此错误。通过将Unity设置为指向Android SDK来解决此问题。