https://kotlinlang.org logo
#ktor
Title
# ktor
r

Rachid

07/06/2020, 7:54 PM
I moved my WebSocket client from JS to the common source set. I see no "compile errors" in IntelliJ, but when building I see messages like:
Error:(3, 23) Kotlin: Unresolved reference: HttpClient
When I CMD+click on that import it jumps to the "ktor-client-core" external lib. Yesterday I somehow fiddled enough to get rid of this error, but today it popped up again. Now I can't start the JVM process anymore. In Gradle for both JVM as common I have these deps:
Copy code
implementation "io.ktor:ktor-client-core:$ktor_version"
implementation "io.ktor:ktor-client-websockets:$ktor_version"
Any idea what's wrong here?
Ah, in JVM I need to include an implementation as well. For JS it has the browsers' WebSocket. For JVM I can add for example
ktor-client-okhttp
3 Views