Search code examples
androidintellij-ideakotlinjvmcorda

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


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 into bytecode that is being built with JVM target 1.6

How can I modify the IntelliJ settings so that all the bytecode is built with the same JVM target?


Solution

  • You can fix this issue as follows:

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