If in build.gradle i have
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
I'll get this error if i'll try to do imageView.load("url")
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option
According to https://coil-kt.github.io/coil/getting_started/ you also need to add the following to your build.gradle:
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
Yep, you'll need to enable Kotlin's jvmTarget = "1.8". D8 should be able to desugar all the APIs if your minSdk is below 24. You may also need to update the Android Gradle Plugin to 3.4.2 or greater.
Most helpful comment
According to https://coil-kt.github.io/coil/getting_started/ you also need to add the following to your build.gradle: