Код: Выделить всё
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
import io.ktor.serialization.kotlinx.json.json
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
StrictMode.setThreadPolicy(
StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyDialog()
.penaltyLog()
.build()
)
}
val client = HttpClient(Android) {
install(ContentNegotiation) {
json()
}
}
...
}
Я обнаружил, что val client = HttpClient() достаточно, чтобы вызвать проблему.
Подробнее здесь: https://stackoverflow.com/questions/797 ... egotiation
Мобильная версия