Why am I getting this error? Cannot access '<java....
# ktor
j
Why am I getting this error? Cannot access 'java.io.Closeable' which is a supertype of 'io.ktor.client.HttpClient'. Check your module classpath for missing or conflicting dependencies Cannot access 'java.lang.AutoCloseable' which is a supertype of 'io.ktor.client.HttpClient'. Check your module classpath for missing or conflicting dependencies My application still runs so I think the problem is that Android Studio can't find the class. I am using Kotlin 1.6.10 and this is a KMP subproject. I have tried both of these in my build.gradle.kts and neither solves the error the IDE is reporting.
Copy code
implementation("org.jetbrains.kotlin:kotlin-stdlib")
And
Copy code
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10")
I am using ktor 2.0.0 and I also have this in build.gradle.kts:
Copy code
java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}
a
This problem is similar to this one. I suggest reporting an issue here.
👍 1
j
Appears it has already been brought up based on the comment here, so no point putting in a bug report that is outside their control. https://discuss.kotlinlang.org/t/closeable-in-common-stdlib/12357