Closed sharafat closed 4 years ago
Hi @sharafat, thanks for submitting this issue.
From the very first glance - it's a result of having jvmTarget=1.8
https://github.com/rybalkinsd/kohttp/blob/master/build.gradle.kts#L29
Probably, we can have separate build for 1.6
cc @IVSivak
Hi @rybalkinsd, thanks for your reply. I'm already using Java 8 for compiling my android app:
android {
compileOptions {
targetCompatibility = "8"
sourceCompatibility = "8"
}
}
If specifying kotlinOptions.jvmTarget = "1.8"
helps, then what's the syntax for including it in my build file? Or if including it doesn't help, is there any workaround I can use?
@sharafat is it possible to share your project somehow (either public/ or private repo)? or anything minimal where I can reproduce this bug?
@rybalkinsd sure, thanks. I've added you to our private Bitbucket repository.
Hello. The issue is that the code in HeaderContext is calling Java 8 method Map.forEach()(which is unavailable on older Android versions) instead of Kotlin's Map.forEach. Details are here
Hi @govorovsky . Thanks for your PR!
fix will be available in 0.11.1
I'm using Kohttp with AndroidAnnotations. For debug builds, I'm using MultiDex and for release builds, I'm disabling MultiDex and enabling ProGuard and Shrinking.
Everything is working fine on Android 8 and 9 devices. However, for Android 4.4 and 6 devices, I'm getting the following error when doing a post request:
What could possibly the issue here? Thanks.