Coil: Incompatible with JVM 1.8

Created on 12 Aug 2019  路  2Comments  路  Source: coil-kt/coil

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

bug

Most helpful comment

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"
    }
}

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  4Comments

dafi picture dafi  路  5Comments

doilio picture doilio  路  3Comments

cioccarellia picture cioccarellia  路  3Comments

gastsail picture gastsail  路  4Comments