ehn-dcc-development / hcert-kotlin

Kotlin multiplatform implementation of the HCERT/DCC specification
Apache License 2.0
25 stars 25 forks source link

DateTime android 5-6-7 #47

Closed Alival-IT closed 3 years ago

Alival-IT commented 3 years ago

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

https://github.com/Kotlin/kotlinx-datetime/issues/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 3 years ago

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

Alival-IT commented 3 years ago

@nodh

it works, so the fix is basically the following:

compileOpitons coreLibraryDesugaringEnabled true

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