I'm writing an android application, which has following Jackson dependencies:
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9'
While building the application using "gradle clean build", the linter reported following errors:
jackson-module-jaxb-annotations-2.9.9.jar: Error: Invalid package reference in library; not included in Android: javax.activation. Referenced from com.fasterxml.jackson.module.jaxb.deser.DataHandlerJsonDeserializer. [InvalidPackage]
jackson-module-jaxb-annotations-2.9.9.jar: Error: Invalid package reference in library; not included in Android: javax.xml.bind.annotation.adapters. Referenced from com.fasterxml.jackson.module.jaxb.AdapterConverter. [InvalidPackage]
jackson-module-jaxb-annotations-2.9.9.jar: Error: Invalid package reference in library; not included in Android: javax.xml.bind.annotation. Referenced from com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector. [InvalidPackage]
It looks like the Jackson module "com.fasterxml.jackson.module.jaxb" is using following packages not available in Android platform:
javax.activation
javax.xml.bind.annotation.adapters
javax.xml.bind.annotation
As per linter documentation - This is only an error if your code calls one of the library classes which wind up referencing the unsupported package.
My understanding is "com.fasterxml.jackson.module.jaxb" module provides support for using JAXB (javax.xml.bind) annotations as an alternative to native Jackson annotations.
If my application is not using any JAXB (javax.xml.bind) annotations and uses only the native Jackson annotations then is it safe to ignore these linter errors (so that I can suppress it)?