kmm-production-sample icon indicating copy to clipboard operation
kmm-production-sample copied to clipboard

Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6

Open akniyetc opened this issue 3 years ago • 3 comments

Happens when project is compiling

core\datasource\storage\FeedStorage.kt: (26, 13): 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 Adding support for Java 8 language features could solve this issue.

akniyetc avatar Jun 13 '21 08:06 akniyetc

you can add these lines inside the kotlin block:

android {
    compilations.all {
        kotlinOptions {
            jvmTarget = "1.8"
        }
    }
}

Nei1eveN avatar Jun 18 '21 17:06 Nei1eveN

Hi guys, that's still not working for me. Any more suggestions about it please ?

if I remove the following line it works: https://github.com/Kotlin/kmm-production-sample/blob/52afdcc7b9d7454a85751c2336c67fed6cb3a02a/shared/src/commonMain/kotlin/com/github/jetbrains/rssreader/core/datasource/storage/FeedStorage.kt#L26

fabs88k avatar Jul 09 '21 17:07 fabs88k

Hi! What is your JAVA_HOME? Could you show me output of ./gradlew clean :android:assembleDebug?

terrakok avatar Jul 16 '21 09:07 terrakok