Does anyone else sees the following problem in `0....
# compose
k
Does anyone else sees the following problem in `0.1.0-dev16`:
Copy code
Class 'androidx.compose.runtime.Composable' is compiled by a new Kotlin compiler backend and cannot be loaded by the old compiler
I can see this even though app is compiling and running on my device
a
update your kotlin version to 1.4.0-rc
k
I’m currently using
1.4.0-rc
and newest Kotlin Plugin
a
hmm make sure everything is updated. I had the same problem before but updating fixed the problem. doublecheck
kotlinCompilerVersion
,
kotlinCompilerExtensionVersion
,
kotlin-stdlib
and
kotlin-gradle-plugin
👍 1
j
Probably you're missing the -Xallow-jvm-ir-dependencies as per the "declaring dependencies" section of the release notes: https://developer.android.com/jetpack/androidx/releases/compose#declaring_dependencies
k
Thank you, this was it. I have multimodule project and I added
-Xallow-jvm-ir-dependencies
stuff in the project level
gradle
file before. It turn out I had to do it in the module I’m using Compose
z
@jim what does that flag actually do? Does the IR backend generate different bytecode that the compiler has to be notified about so it can interact correctly or something? Or is it just a warning to prevent accidentally including experimental dependencies?
j
The later, avoiding experimental dependencies.
👍 1