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 (15)

  1. 9c293b2d720ddfcf1472439e9fe06fd5?d=mm

    minhchanh991

    Aug 27, 2019 10:52

    The problem is backkkk

  2. E8385b341f3df60512eb2eacbafa6f88?d=mm

    mpjunior_unity

    Aug 26, 2019 01:22

    Hi, is the ticket already reopened?
    Here I just upgraded to 2019.2.2f1, the problem remains.

    regards.

  3. 069160ca347463dec724288faefe606c?d=mm

    bithero-no

    Aug 24, 2019 18:04

    Still an problem in 2019.2.2f1. Updated two projects to 2019.2.2f1 today, and the projects settings dosn't work and I still get the error in the console.

    Was able to see the projects settings after manually setting the android versions after opening the ProjectSettings file in a texteditor.

    AndroidMinSdkVersion: 19
    AndroidTargetSdkVersion: 28

    The android versions dropdowns will still not show up in projects settings, but I can atleast adjust all other settings.

  4. 351997a13f842290031173c5a190a930?d=mm

    Hoglet

    Aug 22, 2019 16:39

    Still present in Unity 2019.2.2 !!! So dear unity reopen the issue...

  5. 9a610e627a1c10a2f3ec6a40475cc61a?d=mm

    alphadogware

    Aug 22, 2019 12:05

    I am running Mac with Java 8 update 221 on 2019.2.2f1 and am having this issue.

  6. 1fedc24bb4a1f244e50e4ca2ca702b19?d=mm

    christopherclarke

    Aug 20, 2019 12:25

    I have a Mac trying to build Oculus Android content and this happens from 2019.2 and above. I have down graded to 2019.14f until this is fixed completely with no workarounds

  7. 0a2f9d2f08e0251ae85e568268a7ce90?d=mm

    Irzorg

    Aug 16, 2019 13:06

    Upgrade Unity from 2018.3 to 2019.2 and problem appears

  8. 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?

  9. 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

  10. 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)

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.