after using upgrading android gradle plugin 7.0.2
i had to upgrade oraclejdk to oraclejdk11
from now i get this error related to sdkmanager
$ yes | sdkmanager "platforms;android-29"
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.SdkManagerCli.main(SdkManagerCli.java:103)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 4 more
my travis file
if: tag IS blank
language: android
android:
components:
- tools
- platform-tools
- tools
- build-tools-29.0.3
- android-29
jdk:
- oraclejdk11
dist: trusty
notifications:
slack: inmobly:ejMYT0401w1ku3SNAg97HIJD
before_install:
- yes | sdkmanager "platforms;android-29"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
script:
- chmod +x build-script.sh
- ./build-script.sh
before_deploy:
- chmod +x before-deploy.sh
- source before-deploy.sh
2 Likes
Montana
November 29, 2021, 8:19pm
3
Thanks @AAverin , yes the fix I published in this thread should also fix your issue.
How to solve it.
What did you published? @Montana
Hey @xx394984678 ,
There was a similar issue posted, my response seemed to help a lot of people experiencing the same thing.
there’s a problem while running Android sdkmanager with Java 11, i don’t want to install JDK 8 or something similar. Is there a way to fix this for Android sdkmanager with JDK 11?
2 Likes
i tried the solution found in this repo, its very helpful
language: java
os: linux
dist: focal
group: edge
git:
depth: false
env:
global:
# for updates check https://developer.android.com/studio#downloads
- ANDROID_SDK_CMD_TOOLS=commandlinetools-linux-7583922_latest.zip
# storepass, keypass, keyalias
- secure: K4PVOrcYr6ZV16GgZWcw5RGDqxRTrilMK6pjz1r+RkQX6EPywmTsUH0y8EGP44bZc+TFMM0UfGPulHfrKzC3LDVSe+CpvNdQqq8c2Ysc9lQLubvFmVlWZ2rjHhA3jtg33FDIAWipb41WZEdmCJE1EI+OMbh8p8/7cGZ4K4tpd3B8ViXrf16ht50C56glL1lS3Jog/g9OEIPdhzYF23nYPOAeV3xJg3WBGxUUMOwp3vrpMJ/bYvnh/XLHUpPWnCcSWhKZolE3C6Itlv3CUdCyd2u8dnbTFX7KK0g4nrJdXJAyith0aE2RB6APdDDIdZkF3p2qU3aWBWVvNzjGc6tYpP9OB8sjobcx9oG8lIaO09qZnM+fLTs5b3ulvl8d3UZI0KxgSocvjxpltrqeuNODGarzwIWAmjxKr3Qnfo5LFUna1UMxKJ1ARyT7zS9yUbfE6ek42aEe7rEaqryjNFE5X6b9D2WexN+68YynvdRfDXlFx2JIW3hWTi7AG4zBI0LKhhtruwLY1hKty3JR5/Dz/dIMW6JZUmLdE7drPmLNBcKRh1H778EOcaD+1q1bzVnwbA+HLfHkO9Rzmk7UOY1ttWzFBH23W/pI6D6mn4WTFng0/iOEsw7fwHaXPGv6ZXxserC/nzmeYb0AfK3wq2p2ztEDtbSblw9lkMBYlvNi5I8=
- secure: SEcF7dl6ImTdeUYtw6dGeHRXbS4h8Ec9+Dnt2rFeobupo4e64818Fo10Uqqf+eM/5VVF2FAJLnEiq1SgfWZKjvUz9batJZNknc2JSKEGQPFaUD55USFCt2rxoLPFJKIee07kPTiXGPM2WWA+42cD+HpXAErMTd3BESsGwjni+xj2PhJuETDGrw+0D5T4TOXgd0uXNPl4p1PE+l3SejPqGQ961Wo+hbxd/y9JyZy/jZ9WW8XA6eEXXtecRY33NspwT58mBXDgZLIM/C3W0qfrGCiOPxwk0RpMo7YMbmYVPLG75AzihDtQ2F7P5edHz7v0yCA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/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache/
This file has been truncated. show original
Hey @oahmedazab ,
Thanks for sharing! This make sense that it works as it follows my YAML flow form my original example.
G00fY2
December 28, 2022, 11:26am
8