adjpd
02/10/2022, 11:24 PMimplementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.2")
to commonMain
in my shared
module, add Clock.System.now().epochSeconds
in my Greeting
file, then run the application in Android, it crashes with an error about not finding java.time.Instance
.Process: com.example.mykmm.android, PID: 2988
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Instant;
at kotlinx.datetime.Instant.<clinit>(Instant.kt:94)
at kotlinx.datetime.Clock$System.now(Clock.kt:14)
at com.example.mykmm.Greeting.greeting(Greeting.kt:7)
ephemient
02/10/2022, 11:31 PMadjpd
02/10/2022, 11:31 PMephemient
02/10/2022, 11:32 PMadjpd
02/10/2022, 11:40 PMcompileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
}