This may be more of an IntellJ question than a com...
# compose-desktop
r
This may be more of an IntellJ question than a compose question, but for some reason lately I see this message all over in compose code:
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
But I have it set in my gradle
Copy code
tasks.withType<KotlinCompile> {
    kotlinOptions {
        jvmTarget = "15"
        useIR = true
    }
}
And in my project settings, so I'm not sure what would be causing that. Any ideas? The code compiles and runs fine. The error is only in the IDE.
t
Maybe you setup the wrong jvm for your project in the IDE module settings. Also i am not sure if jvmTarget = 15 is valid. I think 1.8 is max but not sure.
r
I double checked to make sure, and I am on AdoptOpenJDK15. As for the valid targets, the docs say
Possible values: "1.6", "1.8", "9", "10", "11", "12", "13", "14", "15" Default value: "1.6"
t
Do you have a MPP project. I think at least for android 1.8 is max
But in my setup i did not specify the jvmTarget for android and it work fine.
r
Nope, just plain compose desktop.
I'm also fairly sure CfD requires at least JVM 11.
Huh, just for a test I set it to 1.8, reloaded gradle, set it back to 15, reloaded gradle again, and the errors vanished.
👍 1
t
ok. nice. Yes for CfD the minimum is 11.
r
Never mind, the errors came back after reopening IntelliJ 😞
t
Did you tried to create a new project from the templates. But i think it is something with the IDE settings. That it picksup the wrong jvm. So you could try to compile with gradle in CLI. Do this work?
r
The code compiles and runs fine. The errors only show in the IDE. By that I mean I see the red underlines all over the place, but running (from run configurations or even just clicking the run icon next to
main
) works without issue.
a
Have u used gradle version +6.5
r
I'm using 6.6.1