Error "Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6" in Kotlin
Hello everyone! I'm new to Kotlin and Android development. Recently I encountered a strange error when building a project in IntelliJ IDEA. I have a simple project that uses the Corda library. When I try to compile the project, Gradle gives the following error:
```
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6
```
The error occurs in several places, but most often when calling inline functions from the Kotlin standard library, such as `let`, `apply`, or `also`. Here is an example of my code:
```kotlin
fun processData(data: String?) {
data?.let {
println("Data is not null: $it")
}
}
fun main() {
processData("Hello, Kotlin!")
}
```
I am using Kotlin version 1.3.72, and in my `build.gradle` I have specified:
No answers yet.
Log in to leave an answer
Blogs