On Android, I’m using `io.ktor:ktor-client-okhttp`...
# ktor
m
On Android, I’m using
io.ktor:ktor-client-okhttp
but need to support Android 4.2+, so I included OkHttp in version
3.12.0
as documented by OkHttp to support Android 4. Will bis cause problems when using Ktor together with OkHttp? Is compatibility between versions documented somewhere?
a
I've tried to replace the current version of the OkHttp library from
4.6.0
to
3.12.0
in the Ktor repository and as the result, the`ktor-client-okhttp` module fails to compile.
m
Hm, I had no problem compiling / building the android app when using Ktor 1.6.6 and OkHttp 3.12.0, and something like a basic get request seems to work (I was more wondering about runtime errors in edge cases etc.), the dependencies look like this:
Copy code
def ktor_version = "1.6.6"
def okhttp_version = "3.12.0"

implementation "io.ktor:ktor-client-core:$ktor_version"
implementation "io.ktor:ktor-client-okhttp:$ktor_version"
implementation "io.ktor:ktor-client-jackson:$ktor_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
implementation("com.squareup.okhttp3:okhttp") {
    version { strictly "$okhttp_version" }
}
Is the ktor repository already on Ktor 2.0? I might be ok with staying on 1.6.6 for now. As CIO only works from Android 8+, I probably would need to use the Android engine to be fully backwards compatible for 4.2, that should work for all future Ktor versions I assume? It would probably be helpful to add the minSDK for every engine in the engine docs, maybe also in context of the ktor version used.
a
Is the ktor repository already on Ktor 2.0?
Yes.
I probably would need to use the Android engine to be fully backwards compatible for 4.2, that should work for all future Ktor versions I assume?
We maintain backward compatibility.
t would probably be helpful to add the minSDK for every engine in the engine docs, maybe also in context of the ktor version used.
We have plans to do this.
👍 1