Cannot inline bytecode built with JVM target 1.8 解决办法

错误bug记录:
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
Cannot inline bytecode built with JVM target 1.8 解决办法_第1张图片
原因:项目是用jvm1.6 构建的 而库则用到了1.8 两者不兼容
解决办法:手动配置支持jvm1.8的特性,在build.gradle(app)文件 下的android结构下:
Cannot inline bytecode built with JVM target 1.8 解决办法_第2张图片
// 设置Java编译版本
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions{
jvmTarget = JavaVersion.VERSION_1_8
}

你可能感兴趣的:(android,android)