ehn-dcc-development/hcert-kotlin

DateTime android 5-6-7

Alival-IT opened this issue · 2 comments

Hello it seems like there is an issue with the following class, have you encountered the same issues ?

java.lang.NoClassDefFoundError: kotlinx.datetime.Instant

similar to

Kotlin/kotlinx-datetime#97

Edit1:
The fix should be
https://developer.android.com/studio/write/java8-support#library-desugaring

Will try tomorrow, and let you know, it might be good to include it in the readme if it works

@nodh
@JesusMcCloud

nodh commented

I've never tried it on those older Android version, but if the suggested solutions works, I'll add that to our readme.

@nodh

it works, so the fix is basically the following:

compileOpitons
coreLibraryDesugaringEnabled true

dependencies
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'