implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9'
While building the android app via "gradle clean build" the linter reported following errors:
/Users/anu/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.9.9/52../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]
/Users/anu/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.9.9/52../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]
/Users/anu/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.9.9/52../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 com.fasterxml.jackson.module.jaxb module uses following packages which does not exists in Android:
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 is for supporting JAXB (javax.xml.bind) annotations as an alternative to native Jackson annotations.
Is it safe to ignore these lint error as long as my application is not uses JAXB annotations and relies only on native Jackson annotations?