每次我尝试打开播放器设置时,它只会显示空白。并且以下错误将显示在控制台中。
我尝试点击此链接:https://answers.unity.com/questions/1320634/unable-to-list-target-platforms-when-i-try-to-buil.html 但是仍然没有用。
CommandInvokationFailure:无法更新Android SDK软件包列表。 /Applications/Unity/Hub/Editor/2019.2.0b1/PlaybackEngines/AndroidPlayer/SDK/tools/bin/sdkmanager --list
stderr [ 线程“主”中的异常java.lang.NoClassDefFoundError:javax / xml / bind / annotation / XmlSchema 在com.android.repository.api.SchemaModule $ SchemaModuleVersion。(SchemaModule.java:156) 在com.android.repository.api.SchemaModule。(SchemaModule.java:75) 在com.android.sdklib.repository.AndroidSdkHandler处。(AndroidSdkHandler.java:81) 在com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:103) 引起原因:java.lang.ClassNotFoundException:javax.xml.bind.annotation.XmlSchema 在java.base / jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) 在java.base / jdk.internal.loader.ClassLoaders $ AppClassLoader.loadClass(ClassLoaders.java:178) 在java.base / java.lang.ClassLoader.loadClass(ClassLoader.java:521) ...另外4个 ] 标准输出[
] 退出代码:1 UnityEditor.Android.Command.WaitForProgramToRun(UnityEditor.Utils.Program p,UnityEditor.Android.Command + WaitingForProcessToExit等待ForProcessToExit,System.String errorMsg)(位于<4e05d4950c734693b0d63f05223d7a90>:0) UnityEditor.Android.Command.Run(System.Diagnostics.ProcessStartInfo psi,UnityEditor.Android.Command + WaitingForProcessToExitwaitingForProcessToExit,System.String errorMsg)(在<4e05d4950c734693b0d63f05223d7a90>:0) UnityEditor.Android.SDKManager.UpdatePackagesList()(在<4e05d4950c734693b0d63f05223d7a90>:0) 已安装UnityEditor.Android.SDKManager.HighestVersion(UnityEditor.Android.SDKManager +组件工具)(位于<4e05d4950c734693b0d63f05223d7a90>:0) UnityEditor.Android.AndroidPlatformIconProvider.GetCurrentSetAndroidSDKVersion()(在<4e05d4950c734693b0d63f05223d7a90>:0) UnityEditor.Android.AndroidPlatformIconProvider.UpdateSDKVersion()(位于<4e05d4950c734693b0d63f05223d7a90>:0) UnityEditor.Android.AndroidPlatformIconProvider.get_targetSDKSupportsAdaptiveIcons()(在<4e05d4950c734693b0d63f05223d7a90>:0) UnityEditor.Android.PlayerSettingsEditorExtension.IconSectionGUI()(位于<4e05d4950c734693b0d63f05223d7a90>:0) UnityEditor.PlayerSettingsEditor.IconSectionGUI(UnityEditor.BuildTargetGroup targetGroup,UnityEditor.Modules.ISettingEditorExtension settingsExtension,System.Int32 sectionIndex)(在/ Users / builduser / buildslave / unity / build / Editor / Mono / Inspector / PlayerSettingsEditorEditor / PlayerSettings803) UnityEditor.PlayerSettingsEditor.OnInspectorGUI()(在/Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/PlayerSettingsEditor/PlayerSettingsEditor.cs:573) UnityEditor.AssetSettingsProvider.OnGUI(System.String searchContext)(在/Users/builduser/buildslave/unity/build/Editor/Mono/Settings/Providers/AssetSettingsProvider.cs:94) UnityEditor.SettingsWindow.DrawControls()(在/Users/builduser/buildslave/unity/build/Editor/Mono/Settings/SettingsWindow.cs:322) UnityEditor.SettingsWindow.DrawSettingsPanel()(在/Users/builduser/buildslave/unity/build/Editor/Mono/Settings/SettingsWindow.cs:313) UnityEngine.UIElements.IMGUIContainer.DoOnGUI(UnityEngine.Event evt,UnityEngine.Matrix4x4 parentTransform,UnityEngine.Rect ClippingRect,System.Boolean isComputingLayout,UnityEngine.Rect layoutSize)(在/ Users / builduser / buildslave / buildslave / unity / build / Modules / UIElements / IMGUIContainer.cs:281) UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)
之前,我可以看到一些选项,以便尝试构建。
答案 0 :(得分:0)
您可以删除引荐来源网址文件夹。
答案 1 :(得分:0)
我遇到了同样的错误,并以不同的方式修复了它。
答案 2 :(得分:0)
我也遇到了这个问题。在我这样做之前没有任何效果:
Unity > Preferences
,选择External Tools
,取消选择所有内容然后重新构建,它会工作