Nikita Khlebushkin
07/16/2021, 6:12 PMjava.lang.NoSuchFieldError: No field MIN of type Lj$/time/Instant; in class Lj$/time/Instant; or its superclasses (declaration of 'j$.time.Instant' appears in /data/app/my.app-Rumayx4kmF4yH-665uzCBw==/base.apk!classes2.dex)
at kotlinx.datetime.Instant.<clinit>(Instant.kt:96)
at kotlinx.datetime.Clock$System.now(Clock.kt:17)
The line where it happens:
val fetchStartEpoch = clock.now().toEpochMilliseconds()
I tried with datetime 0.1.1 and 0.2.1, same result.
Another interesting detail is that it only happened after I added
compileOptions {
isCoreLibraryDesugaringEnabled = true
}
I had to add it after the library started to crash on Android 26. Any clues how I can deal with it?datetime
as a dependency. The app crashes on API 24 on the library execution step with the error in the OP. Adding isCoreLibraryDesugaringEnabled = true
in android
block of the library doesn't help, adding this line into native app crashes the app literally on each platform (not just 24). Is there something I am doing wrongly?