Does OkHttp 4.0.0 require JVM target 1.8?
Found a blog post with some explanations. Since OkHttp 3.13.1 JVM target 1.8 is required. The suggested change is:
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
...
}
I found that it still fails. Adding one more instruction finally fixes the build.
kotlinOptions {
jvmTarget = '1.8'
}