Facing this issue while adding `clickable` method ...
# compose
p
Facing this issue while adding
clickable
method in compose view
org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
kotlin version : '1.4.32' compose version : '1.0.0-beta09' Let me know if anyone has any clue how to resolve this. cc @Ian Lake
a
Did you disable the warnings around which kotlin version you're using? 🙂
p
Actually I got no such warnings while using above combination of versions.
@Adam Powell If I use kotlin version
1.5.2
then I got a compilation error stating to use
1.4.32
so I downgraded my version. Been stuck for hours, someone please help me out here.
a
Use kotlin 1.5.10
p
@Adam Powell Then it doesn't compile and throws this compilation error
Copy code
e: This version (1.0.0-beta07) of the Compose Compiler requires Kotlin version 1.4.32 but you appear to be using Kotlin version 1.5.10 which is not known to be compatible.
a
Use Compose beta09 and Kotlin 1.5.10 together
p
Yeah I use
1.0.0-beta09
but during error it shows
(1.0.0-beta07)
, and the issue still persists
a
Check that you've specified the right version of the compose compiler plugin as shown here https://developer.android.com/jetpack/androidx/releases/compose-compiler#declaring_dependencies
s
Can you share your gradle files
f
I have the same problem after updating to beta09 and Java 11, it complains beta07 requires 1.4.32, when there is no reference t beta07 in the gradle files. I have a sample project with a branch with the update to beta09 showing the error here https://github.com/fvilarino/Weather-Sample/tree/feature/update_compose_beta_09
i
@Francesc - looks like you're missing the
kotlinCompilerExtensionVersion
in your
build.gradle.kts
files, you do need that line as per the line Adam shared
f
thanks, I'll look into that in a bit
that fixed it for me, thanks again for pointing me in the right direction. I notice though that
kotlinCompilerVersion
is marked as deprecated
that's what my gradle file was missing, I had only
kotlinCompilerExtensionVersion
in there
p
@Ian Lake @Adam Powell I have all the declarations in place, still this same issue occurs
Copy code
e: This version (1.0.0-beta07) of the Compose Compiler requires Kotlin version 1.4.32 but you appear to be using Kotlin version 1.5.10 which is not known to be compatible.
Copy code
If i rollback to version 1.4.32 then it works fine until I start adding clickable to compose widgets where it starts throwing org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
s
Just a guess but maybe you're using different compose versions for different compose dependencies?
i
If you have any error message saying Compose Compiler beta07, then no, you haven't added those lines in the right place as if you did, you'd be using beta09 🙃 Do you have multiple modules and did you update them all?
p
It finally worked, thanks a lot guys 🙌