skydoves / sandwich

🥪 Sandwich is an adaptable and lightweight sealed API library designed for handling API responses and exceptions in Kotlin for Retrofit, Ktor, and Kotlin Multiplatform.

Home Page:https://skydoves.github.io/sandwich/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option

mohammednawas8 opened this issue · comments

  • Library Version 1.3.9
  • Affected Device(s) [e.g. Samsung Galaxy s10 with Android 9.0]

Describe the Bug:
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option

My gradle.build has the following
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}

the gradle JDK version is 17

Add a clear description about the problem.

Solved by changing the java bytecode compiler to version 11, you can do so by changing :
sourceCompatibility = JavaVersion.VERSION_1_8 to sourceCompatibility = JavaVersion.VERSION_11
and jvmTarget = "1.8" to jvmTarget = "11"