I’ve been having some issues updating to Ktor clie...
# ktor
b
I’ve been having some issues updating to Ktor client 3 on Android. I keep getting this error, but if I downgrade it, it works fine. I’ve tried clearing all of my gradle caches and rebuilding.
Copy code
Caused by: java.lang.ClassNotFoundException: Didn't find class "io.ktor.client.plugins.contentnegotiation.ContentNegotiation"
Has anyone else been seeing this?
s
Did you also add
io.ktor:ktor-client-content-negotiation
to your dependencies (with the same version)?
b
Yup, I added it in every module where it's being used and as an api rather than implementation. It's so weird that version 3 breaks it
s
I'm on
3.0.0-rc-1
right now and not experiencing any dependency issues to be fair.
a
Can you please share the full stack trace? Can you check that you don't mix Ktor 2.* and 3.* in the project?
b
Good callout. I just realized that it’s an external dependency that’s using ktor 2 and my project is using ktor 3.
r
I've also been seeing this same error. When I try tu build a release version of my android app, ContentNegotiation comes up in the missing_rules of proguard
b
For me it was happening because supabase kotlin was using an old version of ktor. In the build issues does it show another library failing to create a class?
r
It's the same for me, one of the libraries i was depending on used an old version of ktor.
321 Views