Closed benjalimm closed 3 years ago
Hey there! Just to add some context:
Our project is based on a relatively standard KampKit configuration, that otherwise compiles and runs fine on iOS.
We added the following to our shared module dependencies:
sourceSets["commonMain"].dependencies {
// ...
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.1.0")
}
And it seems to work fine on Android as well as common layer compile tasks, but emits the following error when we try to build from xcode, or execute the iosMainKlibrary
task:
e: Could not find "/Users/benjaminlim/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-datetime-iosarm64/0.1.0/f56a0f1b22d3be80644aaf5f6de94fc17efc097d/kotlinx-datetime.klib" in [/Users/benjaminlim/Desktop/gameface-kampkit/ios/Pods, /Users/benjaminlim/.konan/klib, /Users/benjaminlim/.konan/kotlin-native-macos-1.3.72/klib/common, /Users/benjaminlim/.konan/kotlin-native-macos-1.3.72/klib/platform/ios_arm64].
If this is more likely a bug with the kotlin multiplatform gradle plugin I'm happy to send it their, way but the failure does appear unique to this library.
Thanks so much!
Could you check whether the file kotlinx-datetime.klib
actually presents at the specified path? Does this directory exist at all?
It appears to be there on my machine, which exhibited the same failure as Ben's:
$ cd ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-datetime-iosarm64/0.1.0/f56a0f1b22d3be80644aaf5f6de94fc17efc097d
$ ls
kotlinx-datetime.klib
I haven't had a chance to play around with the date library yet, so maybe if I get a chance tonight I'll take a look.
Thanks man that would be great! I had assumed that we had just mucked something up in the gradle scripts, but I guess it's possible that there's something actually wrong with the artifacts as deployed.
I just added this to KaMP Kit and it works. Looking back at the error, I see 5.6.4
in the gradle error message, which I assume means you're on KaMP Kit that was built with 1.3.72, not 1.4.0. You'll need to update to a recent version and get on Kotlin 1.4.0.
....crap.
I knew when we posted this that it was going to be something embarrassing. Can confirm that the project is still on 1.3.72. Good looking out Kevin. @benjalimm can you close out the issue?
Hey man. Lots of versions floating around. It's confusing. I just do this all day, every day.
I'm glad that we've managed to find the solution.
@asarazan and I were not able to build on iOS for a kampkit project. Any idea how to resolve it? Much appreciated!
Here are some of the error logs: