4

I've faced a strange error with JAXB on Android.

Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    /Applications/Android Studio.app/sdk/build-tools/21.0.2/dx --dex --output /Users/aaron/AndroidStudioProjects/client/app/build/intermediates/pre-dexed/debug/stax-api-1.0-2-423956290996cba5c5243bbc25620fb74a9a3abd.jar /Users/aaron/.gradle/caches/modules-2/files-2.1/javax.xml.stream/stax-api/1.0-2/d6337b0de8b25e53e81b922352fbea9f9f57ba0b/stax-api-1.0-2.jar
  Error Code:
    1
  Output:
    trouble processing "javax/xml/stream/EventFilter.class":
    Ill-advised or mistaken usage of a core class (java.* or javax.*)
    when not building a core library...     

Any ideas how to fix it?

Alex
  • 2,091
  • 6
  • 31
  • 49

1 Answers1

1

It seems like JAXB does not run on Android OOTB.

I see here that people went great lengths to make it work, with some success. StAX is also not in the SDK Level 21.

See also:

Is there a need in JAXB implementation for Android?

Community
  • 1
  • 1
lexicore
  • 42,748
  • 17
  • 132
  • 221