Search Issue Tracker

Fixed in 2019.2

Votes

19

Found in

2019.2.0a1

2019.2.0a7

2019.3.0a1

Issue ID

1136069

Regression

Yes

[Android] CommandInvokationFailure appears in console when inspecting the API levels in Player Settings if using Bundled SDK

Mobile

-

To reproduce this issue:
- Install either Unity Editor 2019.3 or 2019.2 using the HUB
- install the Android Module and the Android SDK and NDK with the module
- start a new project
- set the platform to Android
- Open Player Settings
- Open the Other Settings section
- Inspect the Minimum API Level and Target API Level fields

Expected Result:
You can change the API levels and no errors appear in the console.

Actual Result:
The fields display "Getting API Levels..." and an error appears in the console:

CommandInvokationFailure: Failed to update Android SDK package list.
E:/Unity/Unity Versions/2019.2.0b1/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(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 5 more

Reproducible in 2019.2.0a4, 2019.2.0b1, 2019.2.0b10 and 2019.3.0a10
Cannot reproduce in 2019.1.8f1

  1. Response avatar

    Resolution Note (fix version 2019.2):

    The Android command line tools do not support Java versions higher than 8 at this time. Having Java 9 or 10 installed may cause this error to occur. The recommended course of action is to uninstall Java 9 or 10 and to only have Java 8 installed on your machine.

Comments (19)

  1. 0a2f9d2f08e0251ae85e568268a7ce90?d=mm

    Irzorg

    Aug 16, 2019 13:06

    Upgrade Unity from 2018.3 to 2019.2 and problem appears

  2. 6d672a8952a16a78fa2fd2fcffdd8079?d=mm

    ahmadpi

    Aug 10, 2019 01:04

    Yeah. I upgraded from 2019.1 to 2019.2.0 also facing this issue. However, after I click build and it built successfully the problem appear. If I restart Unity the problem appear again.

    Any thoughts?

  3. Fe32c0e94dbcb4ac0cbc67811e453025?d=mm

    RFredW_Exient

    Aug 05, 2019 13:22

    Workaround:-
    (Force JDK 8 - The version that can be installed as part of unity doesn't get used when running android's sdkmanager, apparently)

    https://stackoverflow.com/questions/49630165/how-to-configure-unity-2017-4-to-target-android-and-avoid-build-failures-on-osx/49630166#49630166

  4. 22f3ca92f49a13e5acc495ced75752a6?d=mm

    innovato

    Aug 01, 2019 11:38

    Affects our project too. We also get a totally blank project settings page when working in iOS platform workspace and clicking to Android player settings. Have to restart Unity before any of the player settings are shown again. (Unity 2019.2f1)

  5. Fa1443981cdc6c4b0e3e84162102548e?d=mm

    kpalych

    Aug 01, 2019 08:56

    My project is affected by this issue.

  6. E594dd0fe318c3205be293e17f69777a?d=mm

    Wezai

    Jul 31, 2019 19:26

    This is also happening to me.

    >This seems to be stopping me from changing player settings or my unity preferences in any project. Is there a workaround? Or do I need to uninstall and reinstall? I am using 2019.3.0a10.

    Samuel if you switch your platform to PC/Mac/Linux you should be able to open a different menu item. Then if you switch back to your original platform it will work normally (until you access the menu that is showing this bug, mine is Icon Settings).

  7. B88e52658e0f0503663de3cd05e7b0f6?d=mm

    Kiecolo

    Jul 31, 2019 04:55

    I notice that OpenJDK is NOT included in the modules by default even though the root Android Built Support is checked but in Unity preferences under External Tools, you can still check JDK installed with Unity with no error. But without the OpenJDK installed, Unity is probably falling back to the System installed JDK. This error then appears if the system installed JDK is version 9 and above because it does not work with Android SDK. (On Unity version 2019.2.0b9)

  8. 2561b5e501a377d4305387eb0c09cde2?d=mm

    NGC6543

    Jul 31, 2019 03:31

    Today Unity released the 2019.2 as stable, and my project is affected by this issue.

  9. E72aa6f625f7b933695eb65a7bc7e206?d=mm

    samuelstow

    Jul 23, 2019 23:58

    This seems to be stopping me from changing player settings or my unity preferences in any project. Is there a workaround? Or do I need to uninstall and reinstall? I am using 2019.3.0a10.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.