代码无法运行
错误详情 :Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 Please spcify proper ‘-jvm-target’ option
解决办法:在app/build.gradle 中的andriod 闭包中加入下列代码:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions{
jvmTarget = JavaVersion.VERSION_1_8
}