Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android-sdk-update failed on JDK 11 #3125

Closed
doniwinata0309 opened this issue Jul 19, 2021 · 2 comments
Closed

android-sdk-update failed on JDK 11 #3125

doniwinata0309 opened this issue Jul 19, 2021 · 2 comments

Comments

@doniwinata0309
Copy link

When using JDK 11, android-sdk-update step failed with this stacktrace:
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:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

Do you have plan to fix this error on this step ? thank you in advance

@ofalvai
Copy link
Contributor

ofalvai commented Jul 19, 2021

Hello @doniwinata0309 👋

This is unfortunately a limitation of the Android SDK, some tools (such as sdkmanager) are not yet compatible with JDK 11 at the moment and need JDK 8 to run correctly. What you can do is change the order of your workflow steps to only enable JDK 11 after your failing step. For more details, see this guide: https://support.bitrise.io/hc/en-us/articles/360017059718

@doniwinata0309
Copy link
Author

ah got it, thanks for the link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants