Skip to content

Nitrite/Java: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Instant; #12

Answered by anidotnet
bahmanebazoo asked this question in Q&A
Discussion options

You must be logged in to vote

Minsdk is 21 as NO2 document says

Have you found this specific version mentioned in nitirte documentation? Could you please point it out? I might need to correct it. The nitrite java library is compatible for api level 19, but potassium nitrite needs api level 26 by default.

Having said that, you can bypass that restriction also in case of potassium nitrite. You just have to set a custom nitrite mapper. See the logic here - https://github.com/nitrite/nitrite-java/blob/9afef01caab7a647dd6b43bd147288b8d6264780/potassium-nitrite/src/main/kotlin/org/dizitart/kno2/Builder.kt#L130

One of such example is there in junit tests, where threetenbp library is used in place of java time - https://git…

Replies: 0 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@bahmanebazoo
Comment options

@bahmanebazoo
Comment options

@bahmanebazoo
Comment options

@bahmanebazoo
Comment options

@bahmanebazoo
Comment options

Answer selected by anidotnet
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
nitrite-java Nitrite for Java
2 participants