Hello everybody, I’m trying to use jetpack compose...
# compose-desktop
e
Hello everybody, I’m trying to use jetpack compose, When I execute the code everything is okay, but the IDE shows somes errors I don’t known why
s
Please show your build.gradle.kts file
e
message has been deleted
j
Try adding:
Copy code
tasks.withType(KotlinCompile).configureEach {
    kotlinOptions {
        useIR = true
    }
}
👍 2
s
Well, it should work. Something goes wrong. It is hard to say what exactly the problem is. Can you please create issue in youtrack https://kotl.in/issue? The problem may be caused by bug that prevents importing
-Xuse-ir
compiler argument, but I’m not shure. You can check it by opening “Project structure”
👍 2
@jim, “org.jetbrains.compose” gradle plugin should add it
e
The problem is solved by adding -Xuse-ir
Thanks
j
@Eric Ampire [MOD] Glad that helped solve your issue. If you're able to reproduce without that block added, would you mind filing a bug with the details (ideally including a minimal repro) and post a link to the bug here? That will help us to debug what happened so other users don't hit the same issue
e
Without adding -Xuse-ir argument ?
s
@Eric Ampire [MOD], yep. Also please specify Intellij and Kotlin plugin version.
e
Okay great
a
+1 Same thing was happening to me, this should be documented!
o
which IDEA/Kotlin plugin version?
a
2020.2/1.4.10 The gradle options does not sync with the idea's facet configurations, see https://stackoverflow.com/questions/64717218/how-to-sync-build-gradle-kts-settings-with-intellij-linter and the issue in issue tracker https://youtrack.jetbrains.com/issue/KT-43221
🙏 2