Robert Jaros
04/13/2022, 1:25 PMCannot access class 'kotlinx.serialization.json.Json'. Check your module classpath for missing or conflicting dependencies
when I try to use content negotiation:
install(ContentNegotiation) {
json(json)
}
I checked the dependencies but I can't see any obvious conflicts.Cannot access class 'kotlinx.coroutines.channels.ReceiveChannel'. Check your module classpath for missing or conflicting dependencies
in the same module when using websockets and channels.simon.vergauwen
04/13/2022, 1:37 PMio.ktor:ktor-serialization-kotlinx-json
as a dependency?Robert Jaros
04/13/2022, 1:38 PMsimon.vergauwen
04/13/2022, 1:49 PMcmd+shift+a
-> Refresh Gradle Dependencies
.
That triggers IntelliJ to rescan and index the dependencies again, so it might correctly resolve the code after that.Robert Jaros
04/13/2022, 1:54 PMsimon.vergauwen
04/13/2022, 1:58 PMapi
dependency on KotlinX Coroutines through Arrow Fx Coroutines though, and KotlinX Serialization Gradle Plugin adds a dependency to KotlinX Seriliaziation Core.Robert Jaros
04/13/2022, 2:07 PMAleksei Tirman [JB]
04/13/2022, 3:12 PMRobert Jaros
04/13/2022, 3:16 PMAleksei Tirman [JB]
04/13/2022, 3:17 PMRobert Jaros
04/13/2022, 3:19 PMapi
type to implementation
typeapi
the error is back as well.implementation("io.ktor:ktor-server-core:$ktorVersion")
dependecy in jvmMain
source set, so coroutines version 1.6.0 is on the classpath.api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
in common source set dosn't fix the problem
but implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
does fix the problemAleksei Tirman [JB]
04/13/2022, 3:28 PMRobert Jaros
04/13/2022, 3:31 PM