```import kotlinx.datetime.toJavaLocalDate import ...
# multiplatform
e
Copy code
import kotlinx.datetime.toJavaLocalDate
import kotlinx.datetime.toJavaLocalTime
I am getting unresolved error when I remove these libraries from gradle although they are not related, I tried to invalidate cache and restart but still the same issue.
Copy code
implementation("com.github.thellmund.Android-Week-View:core:5.2.4")
implementation("com.github.thellmund.Android-Week-View:jsr310:5.2.4")
implementation("com.github.thellmund.Android-Week-View:emoji:5.2.4")
implementation("com.himanshoe:kalendar-endlos:1.0.0")
a
where is your dependency on kotlinx-datetime defined?
v
Copy code
implementation("com.himanshoe:kalendar-endlos:1.0.0")
->
https://github.com/hi-manshu/Kalendar/blob/main/kalendar-endlos/build.gradle.kts
-> https://github.com/hi-manshu/Kalendar/blob/main/buildSrc/src/main/kotlin/Dependencies.kt ->
Copy code
object DateTime {
        val date by lazy { "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0" }
    }
This is where it comes from. So removing it causes the issue. - But in all actuallity, this post has nothing to do with multiplatform 😞
e
my dependancy is in the build.gradle.kts (shared)
v
Mhm, but all of these libraries are Android-specific libraries, they are not multiplatform libraries. 😕
e
Copy code
with(Deps.Kotlinx) {
    implementation(coroutinesCore)
    implementation(serializationCore)
    implementation(serializationJson)
    implementation(dateTimeKtx)
}
no only date time in the shared the others in android
Copy code
sourceSets {
    val commonMain by getting {
        dependencies {
            with(Deps.Ktor) {
                implementation(clientCore)
                implementation(clientJson)
                implementation(clientLogging)
                implementation(contentNegotiation)
                implementation(auth)
                implementation(json)
            }

            with(Deps.Realm) {
                implementation(libraryBase)
            }

            with(Deps.Kotlinx) {
                implementation(coroutinesCore)
                implementation(serializationCore)
                implementation(serializationJson)
                implementation(dateTimeKtx)
            }
any idea?
a
What’s the actual GAV of kotlinx-datetime? What’s the path of the file that has the import problem?
e
Copy code
object Kotlinx {
    const val serializationCore = "org.jetbrains.kotlinx:kotlinx-serialization-core:${Versions.kotlinxSerialization}"
    const val serializationJson = "org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.kotlinxSerialization}"
    const val coroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}"
    const val coroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.kotlinCoroutines}"
    const val htmlJs = "org.jetbrains.kotlinx:kotlinx-html-js:${Versions.kotlinxHtmlJs}"
    const val dateTimeKtx= "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0"
}
it should be api instead of implementation