Change Java language level and jvmTarget to 8 in all modules if using a lower level.【已解决】

e: H:\project\android\anguo\android_code\app\src\main\java\com\shuyu\github\kotlin\module\issue\IssueOptionCommentController.kt: (45, 28): 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.

Change Java language level and jvmTarget to 8 in all modules if using a lower level.
More information...


解决方案 切换kt编译版本到1.8

kotlin的语法 在我的里面不生效了 。还报错。十分痛苦

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章