I was able to successfully run the sample app generated by Android Studio in both Android and iOS. I chose CocoaPods during the Wizard steps.
But when I add kotlinx-datetime to my dependencies, I can only run the app for Android.
My build.gradle.kts :
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.0")
}
}
...
When adding the library I get the following error:
> Task :shared:linkDebugFrameworkIosX64 FAILED
e: Compilation failed: Expecting descriptor for kotlin.time/TimeMark.<init>|-5645683436151566731[0]
* Source files:
* Compiler version info: Konan: 1.7.0 / Kotlin: 1.7.20
* Output kind: STATIC_CACHE
e: java.lang.IllegalStateException: Expecting descriptor for kotlin.time/TimeMark.<init>|-5645683436151566731[0]
How to reproduce:
Any ideas how to solve this?
After upgrading to Kotlin 1.7.0 and using kotlinx-datetime 0.3.2, I started to face the same issue.
As suggested here , upgrading to org.jetbrains.kotlinx:kotlinx-datetime:0.3.3
solved the issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.