Build Fails due to avd manager issue

Bitrise Build Issue Report template

Description of the issue

I am trying to run our Pipeline but it is fails due to avd manager issue

Environment:

linux-docker-android

Which build Step causes the issue and which version of the step?

avd-manager

±-----------------------------------------------------------------------------+

| (8) avd-manager@1.0.1 |
±-----------------------------------------------------------------------------+
| id: avd-manager |
| version: 1.0.1 |
| collection: GitHub - bitrise-io/bitrise-steplib: New Bitrise StepLib |
| toolkit: go |
| time: 2021-10-04T11:33:27Z |
±-----------------------------------------------------------------------------+
| |
Config:

  • AndroidHome: /opt/android-sdk-linux
  • APILevel: 26
  • Tag: google_apis
  • DeviceProfile: pixel
  • CreateCommandArgs: --sdcard 512M
  • StartCommandArgs: -camera-back none -camera-front none
  • ID: emulator
  • Abi: x86
  • EmulatorChannel: 0
    Update emulator
    $ /opt/android-sdk-linux/tools/bin/sdkmanager “–verbose” “–channel=0” “emulator”
    Failed to run phase, error: exit status 1, output: 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)
    … 5 more
    | |
    ±–±--------------------------------------------------------------±---------+
    | x | avd-manager@1.0.1 (exit code: 1) | 2.11 sec |
    ±–±--------------------------------------------------------------±---------+
    | Update available: 1.0.1 → 1.0.3 |
    | |
    | Release notes are available below |
    | Releases · bitrise-steplib/steps-avd-manager · GitHub |
    | Issue tracker: Issues · bitrise-steplib/steps-avd-manager · GitHub |
    | Source: GitHub - bitrise-steplib/steps-avd-manager |
    ±–±--------------------------------------------------------------±---------+

Hello @MinaRezkalla,
Can you please share a build URL?
If you have not yet, please update to Ubuntu 20.04 (linux-docker-android-20.04).
Also please update the Step version (from 1.0.1 to 1.0.3)

I believe this is caused by an incorrect Java version being the default on the Stack. We will investigate this, in the meantime this may be worked around by selecting Java version 11 (Virtual machines | Bitrise DevCenter).