-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Describe the bug
During development of an Android App (min SDK 23), everything works fine and all necessary dependencies are found.
However only when creating a release build of the application (even with proguard disabled) the application crashes with the following stacktrace:
java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: Provider com.fasterxml.jackson.datatype.jsr310.JavaTimeModule could not be instantiated at java.util.ServiceLoader.fail(ServiceLoader.java:233) at java.util.ServiceLoader.access$100(ServiceLoader.java:183) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:392) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:416) at java.util.ServiceLoader$1.next(ServiceLoader.java:494) at com.fasterxml.jackson.databind.ObjectMapper.findModules(ObjectMapper.java:1081) at com.fasterxml.jackson.databind.ObjectMapper.findModules(ObjectMapper.java:1065) at com.fasterxml.jackson.databind.ObjectMapper.findAndRegisterModules(ObjectMapper.java:1115) ..... Suppressed: java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: Provider com.fasterxml.jackson.datatype.jsr310.JavaTimeModule could not be instantiated ... 24 more Caused by: java.lang.NoClassDefFoundError: <clinit> failed for class com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer; see exception in other thread at com.fasterxml.jackson.datatype.jsr310.JavaTimeModule.<init>(JavaTimeModule.java:119) at java.lang.Class.newInstance(Native Method) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:388) ... 21 more Suppressed: java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: Provider com.fasterxml.jackson.datatype.jsr310.JavaTimeModule could not be instantiated ... 24 more Caused by: java.lang.NoClassDefFoundError: <clinit> failed for class com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer; see exception in other thread at com.fasterxml.jackson.datatype.jsr310.JavaTimeModule.<init>(JavaTimeModule.java:119) at java.lang.Class.newInstance(Native Method) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:388) ... 21 more Caused by: java.lang.NoSuchFieldError: No field ISO_ZONED_DATE_TIME of type Lj$/time/format/DateTimeFormatter; in class Lj$/time/format/DateTimeFormatter; or its superclasses (declaration of 'j$.time.format.DateTimeFormatter' appears in /data/app/-3AsahYi2BhLBw_E80LXboQ==/base.apk!classes2.dex) at com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer.<clinit>(InstantDeserializer.java:80) at com.fasterxml.jackson.datatype.jsr310.JavaTimeModule.<init>(JavaTimeModule.java:119) at java.lang.Class.newInstance(Native Method) 2021-07-27 19:41:07.096 27839-27839/? E/AndroidRuntime: at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:388) ... 21 more
The project has core library desugaring configured and enabled.
Do you know of anybody who uses this library and has similar issues and found a way to resolve or investigate them?
I found several reports, stack overflow entries and mentions of issues with com.fasterxml.jackson.datatype:jackson-datatype-jsr310 on Android but unfortunately all without information about how to resolve them.