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.
implementation("org.jetbrains.kotlin:kotlin-stdlib")
And
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:
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}