I’m running into issues with the latest version of...
# compose
b
I’m running into issues with the latest version of Android Studio and the Kotlin 1.4-M3 plugin. Is this expected? The build compiles with no issues, it’s just really driving me up the wall to see so many red squiggles
Copy code
Class 'androidx.compose.Composable' is compiled by a new Kotlin compiler backend and cannot be loaded by the old compiler
are you referring to this?
Copy code
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
    kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs += ["-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check"]
    }
}
because that it’s in my build gradle already
j
is it in your module's build.gradle as oppose to your project's build.gradle?
b
it’s in the app’s build gradle
Does it need to be top level?
j
I think it is a per-module thing. There should be no harm in putting it in all your build.gradle files just to be sure.
b
Fwiw migrating it to the top build gradle file doesn’t allow compilation
but putting it at the bottom of my app’s build gradle file fixed it 🤔
oh well ¯\_(ツ)_/¯
🤷 1
thanks for the help
j
👍
t
For me putting the tasks to the last line of the gradle file do not help. Everytime when i open Android Studio i get this red squiggles again. What helps for me is doing a reload (sync) of gradle every time i started AS.