1. 程式人生 > 其它 >Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target

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

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

解決方案:
在build.grade(app)中新增如下程式碼

android {
	...
    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }
 
    kotlinOptions {
        jvmTarget = "1.8"
    }
}