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

Emirhan Emmez

03/09/2023, 8:27 AM
Hi all, I saw an issue on YouTrack about one Ktor bug that I had the same: https://youtrack.jetbrains.com/issue/KTOR-5227 I saw your comment. Is there any fix about it? My dependency tree:
Copy code
plugins {
    id 'com.android.application' version '7.4.2' apply false
    id 'com.android.library' version '7.4.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
    id 'com.google.dagger.hilt.android' version '2.44' apply false
    id 'org.jetbrains.kotlin.jvm' version '1.8.10' apply false
}
Ktor version: 2.2.4 JDK version: 11 My Network module:
Copy code
@Provides
@Singleton
fun createKtorClient(): HttpClient =
     HttpClient(Android).config {
         defaultRequest {
             url("<http://localhost:8080/>")
             contentType(ContentType.Application.Json)                
             accept(ContentType.Application.Json)
         }
         install(Logging) {
             level = LogLevel.ALL
         }
         install(ContentNegotiation) {
             json()
         }
        }
✔️ 1
a

Aleksei Tirman [JB]

03/13/2023, 11:50 AM
The problem was in the logback classic dependency.
👍 1
3 Views