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"
    }

 

 

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