添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I’m trying to build my game and during the build phase I’m getting this error!!

I’m using Unity 2019.3.12f1

Pavlos Mavris:

I’m trying to build my game and during the build phase I’m getting this error!!

I’m using Unity 2019.3.12f1

Do you use a custom SDK? This issue should not happen when using SDK installed from the hub.

I get this error before trying to build the game!!

CommandInvokationFailure: Failed to update Android SDK package list.
/Applications/Unity/Hub/Editor/2019.3.12f1/PlaybackEngines/AndroidPlayer/SDK/tools/bin/sdkmanager --list

stderr[
Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
… 5 more
stdout[

exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.SDKManager.UpdatePackagesList () (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.SDKManager.ListAvailable (UnityEditor.Android.SDKManager+Component type) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PlayerSettingsEditorExtension+<>c__DisplayClass90_0.b__0 () (at <3167064085404657b0d6c498207da025>:0)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Threading.ThreadHelper.ThreadStart () (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEngine.<>c:b__0_0(Object, UnhandledExceptionEventArgs) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Scripting/UnhandledExceptionHandler.bindings.cs:46)

During the build phase I get this errors(14 errors):

UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

at com.android.repository.api.SchemaModule.(SchemaModule.java:75)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

… 5 more
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

CommandInvokationFailure: Failed to update Android SDK package list.
/Applications/Unity/Hub/Editor/2019.3.12f1/PlaybackEngines/AndroidPlayer/SDK/tools/bin/sdkmanager --list
stderr[
Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
… 5 more
stdout[

exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.SDKManager.UpdatePackagesList () (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.SDKManager.HighestVersionInstalled (UnityEditor.Android.SDKManager+Component tool) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKToolsDetector.GetVersion () (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector.Detect (System.Version minVersion, UnityEditor.Android.PostProcessor.ProgressHandler onProgress) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (System.Version minVersion, UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector detector) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <3167064085404657b0d6c498207da025>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

Build completed with a result of ‘Failed’ in 3 seconds (2711 ms)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

UnityEditor.BuildPlayerWindow+BuildMethodException: 13 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002af] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:194
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)

That’s all the errors!
I don’t know why there is a smile face there, it should be something like this “: P”

Everything seems to be normal inside the preferences, should I changed anything inside Android Studio preferences?
Also I’ll try to upgrade to Unity 2019.3.13f1 and see if this will solve the problem.
One more thing this error started since I added the Google Play Service plugin.

I’m facing the same issue since I added the Google Play Services plugin (v10.09), using Unity 2019.3.9f1

Using the JDK/SDK tools/NDK/Gradle from the Unity Hub and preferences are all set and normal.

Error log:

CommandInvokationFailure: Failed to update Android SDK package list.
C:/Program Files/Unity/Hub/Editor/2019.3.9f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK\tools\bin\sdkmanager.bat --list
stderr[
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
stdout[
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <c28be54006ad442989ee1a401e08ea78>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <c28be54006ad442989ee1a401e08ea78>:0)
UnityEditor.Android.SDKManager.UpdatePackagesList () (at <c28be54006ad442989ee1a401e08ea78>:0)
UnityEditor.Android.SDKManager.ListAvailable (UnityEditor.Android.SDKManager+Component type) (at <c28be54006ad442989ee1a401e08ea78>:0)
UnityEditor.Android.PlayerSettingsEditorExtension+<>c__DisplayClass89_0.<StartGettingReleasedAPILevels>b__0 () (at <c28be54006ad442989ee1a401e08ea78>:0)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Threading.ThreadHelper.ThreadStart () (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)
              

Which version are you using then? Because the latest seems to be v10.9, found here:
https://github.com/playgameservices/play-games-plugin-for-unity

And that one is giving me this error.

Im tried in MAC with Unity 2019.3.2.f1, Unity 2019.3.15.f1 with v10.09. both failed.
CommandInvokationFailure: Failed to update Android SDK package list.
The google ads plugin loads, resolver runs, Unity cant build anymore :frowning:

Any working tutorial will be highly appreciated…

cbodapati:

Im tried in MAC with Unity 2019.3.2.f1, Unity 2019.3.15.f1 with v10.09. both failed.
CommandInvokationFailure: Failed to update Android SDK package list.
The google ads plugin loads, resolver runs, Unity cant build anymore :frowning:

Any working tutorial will be highly appreciated…

[SOLUTION]
Try this go to Unity->Preferences->External Tools and disable(uncheck) the JDK,Android SDK,Android NDK, Grandle.
Now try to build the game and obviously it will hit error, after that go and enable everything that you have disabled before, now Unity will try to let’s say re-install the tools.

Pavlos Mavris:

Try this go to Unity->Preferences->External Tools and disable(uncheck) the JDK,Android SDK,Android NDK, Grandle.
Now try to build the game and obviously it will hit error, after that go and enable everything that you have disabled before, now Unity will try to let’s say re-install the tools.

Thank you, same issue and this solution has solved it!

Help i have this error i am using the hub sdk jdk and ndk BUT I STILL GET IT HOW pls help

im stressing out

Arcstrider:

Help i have this error i am using the hub sdk jdk and ndk BUT I STILL GET IT HOW pls help

im stressing out

I just solved this issue and got an android build made.
Follow the steps:

  • Check if sdkmanager.bat exists in the unity’s modules location. Generally:
    C:\Program Files\Unity\Hub\Editor\2019.4.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin
  • If NOT, then do a fresh install of unity with android module and DO NOT OPEN UNITY. Copy the file in a safe location first.

  • Open “cmd” (command prompt) in Administrator mode
  • Type the unity editors location with --projectPath parameter
    eg (I have masked out my project folder) :
  • Once you have provided your project path (the folder which contains “Assets” folder), just go ahead and make an android build.

    Apparently unity runs “sdkmanager.bat --list”, but the list runs only in adminn mode.

    Hope you will be able to make android builds.
    I am now after 2-3 months!

    Cheers!

    Pavlos Mavris:

    Try this go to Unity->Preferences->External Tools and disable(uncheck) the JDK,Android SDK,Android NDK, Grandle.
    Now try to build the game and obviously it will hit error, after that go and enable everything that you have disabled before, now Unity will try to let’s say re-install the tools.

    It worked for me. :smile:
    You saved my life :wink:
    Actually after looking at the JDK/NDK/Gradle path in “Unity->Preferences->External Tools” I saw that they were pointing to the 2019.3.xx Unity version that was uninstalled by me!

    Pavlos Mavris:

    Try this go to Unity->Preferences->External Tools and disable(uncheck) the JDK,Android SDK,Android NDK, Grandle.
    Now try to build the game and obviously it will hit error, after that go and enable everything that you have disabled before, now Unity will try to let’s say re-install the tools.

    thank you so much. that helped me. I m using macOs

    Sadly still getting this error after trying to integrate google Login, unity 2020.3.0f1
    tried checking/ unchecking , reinstalling the module nothing works
    [EDIT : whenever i try to build my game it gets stuck in building the first scene and never finishes, tried changing the scene and it didn’t make a difference i think the build process is broken]