Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with JVM 1.8 #2

Closed
felislynx-silae opened this issue Aug 12, 2019 · 2 comments
Closed

Incompatible with JVM 1.8 #2

felislynx-silae opened this issue Aug 12, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@felislynx-silae
Copy link

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

@felislynx-silae felislynx-silae added the bug Something isn't working label Aug 12, 2019
@Stonos
Copy link

Stonos commented Aug 12, 2019

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

@colinrtwhite
Copy link
Member

colinrtwhite commented Aug 12, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants