Skip to content

Conversation

@fenix-hub
Copy link
Contributor

Godot Version: 4.0.2 (Steam)
Godot CPP version: 4.0.2
OS: Windows 11

I was trying to compile the engine for Android exports using the Android SDK installed via Android Studio.
I was failing the part accepting Android SDK licenses due to an exception thrown by the tools/bin/sdkmanager bat:

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:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 5 more

Looks like the tools folder has been deprecated and replaced with the cmdline-tools folder instead. Reference.
Indeed using the new command line tools it works.

~\AppData\Local\Android                                                                                     
➜ .\Sdk\cmdline-tools\latest\bin\sdkmanager.bat "--sdk_root=C:\Users\nsant\AppData\Local\Android\Sdk" --licenses
All SDK package licenses accepted.======] 100% Computing updates...

Update the command-line tools folder path
@paddy-exe paddy-exe added area:engine details Issues and PRs related to the Engine Details section of the documentation topic:buildsystem labels May 1, 2023
@mhilbrunner mhilbrunner requested a review from m4gr3d May 1, 2023 14:49
Copy link
Contributor

@m4gr3d m4gr3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the update!

@mhilbrunner mhilbrunner merged commit 739080e into godotengine:master May 1, 2023
@mhilbrunner
Copy link
Member

Thanks and congrats on your first merged docs contribution! And thanks for the review m4gr3d :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:engine details Issues and PRs related to the Engine Details section of the documentation topic:buildsystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants