I'm building an android app that uses Jackson libraries. Jackson dependency 
is added as follows:

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?

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/97df3d8e-d742-454e-97ba-62e1cd7d5574%40googlegroups.com.

Reply via email to