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
Setting sourceCompatibility = JavaVersion.VERSION_1_8
enables desugaring, but it is currently unable to desugar all the Java 8 features that the Kotlin compiler uses.
Fix - Setting kotlinOptions.jvmTarget to JavaVersion.VERSION_1_8
in the app module Gradle would fix the issue.
Use Java 8 language features: https://developer.android.com/studio/write/java8-support
android {
...
// Configure only for each module that uses Java 8
// language features (either in its source code or
// through dependencies).
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// For Kotlin projects
kotlinOptions {
jvmTarget = "1.8"
}
}