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

后端 未结 30 1155
走了就别回头了
走了就别回头了 2020-11-29 14:36

When trying to run the Example CorDapp (GitHub CorDapp) via IntelliJ, I receive the following error:

Cannot inline bytecode built with JVM target 1.8 int

30条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-29 15:19

    In Android Studio 4.3.2 adding through the below procedure is not working.

    1. Open the IntelliJ preferences
    2. Go to Build, Execution, Deployment > Compiler > Kotlin Compiler BUT Other Settings > Kotlin compiler if Android Studio > 3.4
    3. Change the Target JVM version to 1.8
    4. Click Apply

    The reason is, Android studio is unable to add the below code in the module level Gradle file. Please add it manually.

    kotlinOptions {
        jvmTarget = "1.8"
    }
    

    Just for the addon, search Target JVM version in the android studio search. It will take you directly to the option.

提交回复
热议问题