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

fix android sdkmanager invocation #582

Merged

Conversation

eronnen
Copy link
Contributor

@eronnen eronnen commented Oct 4, 2023

Changes

Fix #581:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
 	at com.***.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
 	at com.***.repository.api.SchemaModule.<init>(SchemaModule.java:75)
 	at com.***.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
 	at com.***.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
	at com.***.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

The fix is to run sdkmanager from the cmdline-tools directory instead of tools/bin directory. The solution was suggested here:
https://stackoverflow.com/questions/46402772/failed-to-install-android-sdk-java-lang-noclassdeffounderror-javax-xml-bind-a

Tested on ubuntu runner

Checklist

  • Read the contribution guide and accept the
    code of conduct
  • Docs (If new inputs or outputs have been added or changes to behavior that should be documented. Please make
    a PR in the documentation repo)
  • Readme (updated or not needed)
  • Tests (added, updated or not needed)

Fix "java.lang.NoClassDefFoundError:
javax/xml/bind/annotation/XmlSchema" error caused by invoking the wrongf
sdkmanager script
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Cat Gif

@codecov-commenter
Copy link

Codecov Report

Merging #582 (554f9d5) into main (a13443a) will not change coverage.
The diff coverage is n/a.

❗ Current head 554f9d5 differs from pull request most recent head ec3b9b5. Consider uploading reports for the commit ec3b9b5 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main     #582    +/-   ##
========================================
  Coverage   37.02%   37.02%            
========================================
  Files          77       77            
  Lines        3041     3041            
  Branches      632      605    -27     
========================================
  Hits         1126     1126            
- Misses       1765     1915   +150     
+ Partials      150        0   -150     

see 38 files with indirect coverage changes

@webbertakken
Copy link
Member

Restarted jobs with upgraded quota for GameCI

@davidmfinol davidmfinol mentioned this pull request Oct 24, 2023
4 tasks
Copy link
Member

@davidmfinol davidmfinol left a comment

Choose a reason for hiding this comment

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

This is better than the change I was making; thank you!

@davidmfinol davidmfinol merged commit 6419c87 into game-ci:main Oct 24, 2023
31 of 32 checks passed
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

Successfully merging this pull request may close these issues.

Install non builtin target android sdk
4 participants