Skip to content

SDK Updater crahes with 'java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema' error #666

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

Closed
codeanticode opened this issue Aug 18, 2021 · 3 comments · Fixed by #713

Comments

@codeanticode
Copy link
Contributor

Due to removal of Java EE modules in Java 11:

https://jaxenter.com/jdk-11-java-ee-modules-140674.html

This could be fixed by using new new Android SDK Command-line Tools For JVM 9, 10, 11, And Later:

https://www.dev2qa.com/how-to-fix-java-lang-noclassdeffounderror-javax-xml-bind-annotation-xmlschema-when-install-android-sdk/

@codeanticode
Copy link
Contributor Author

The sdklib package has new versions after the one currently in use (27.1.1)

https://mvnrepository.com/artifact/com.android.tools/sdklib?repo=google

but those probably need a newer version of gradle #661

@rupeshkumar22
Copy link
Contributor

I confirm this issue, SDKDownload.java needs to be configured to download the latest command-line tools. Changing android-toolslib version to recent latest 30.1.3 showed some used methods have been replaced and removed. Here is a part of the errors after changing the version -

SDKUpdater.java:161: error: method getInstance in class AndroidSdkHandler cannot be applied to given types;
      AndroidSdkHandler mHandler = AndroidSdkHandler.getInstance(sdkFolder);
                                                    ^
  required: AndroidLocationsProvider,Path
  found: File
  reason: actual and formal argument lists differ in length
\SDKUpdater.java:164: error: cannot find symbol
      FileSystemFileOp fop = (FileSystemFileOp) FileOpUtils.create();
      ^
  symbol:   class FileSystemFileOp
  location: class SDKUpdater.QueryTask

Not sure, but does resolving this issue really depend on Gradle upgrade? @codeanticode

@codeanticode
Copy link
Contributor Author

I don't think it depends on updating Gradle to a newer version, which was updated already to 7.x (#661)

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

Successfully merging a pull request may close this issue.

2 participants