ocpsoft / prettytime

Social Style Date and Time Formatting for Java
http://ocpsoft.org/prettytime/
Apache License 2.0
1.29k stars 253 forks source link

NoClassDefFoundError on android API level < 26 #204

Closed albertobasso closed 3 years ago

albertobasso commented 3 years ago

Dear developers, using the latest version of the library (5.0.0.Final) I'm unable to resolve the crash: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Instant; On Android sdk documentation https://developer.android.com/reference/java/time/Instant.html I see in the upper right corner "added in API level 26" which means the class is not available on older android devices. So... do you'll fix this issue adding a backward compatible method for android < 8.0? Otherwise is maybe necessary report that this release works only with API level >= 26 of android. Thanks for your job! Alb.

lincolnthree commented 3 years ago

Hello!

Have you tried following the instructions linked in the README in this repo that describe how to use in API levels <26?

https://github.com/ocpsoft/prettytime#android https://developer.android.com/studio/write/java8-support#library-desugaring

If that is what you're looking for, we could certainly make this notice more visible.

Thanks!

lincolnthree commented 3 years ago

Closing, as this is already documented. If something is wrong with what's we've documented, please feel free to comment or open a new issue. Thanks.