https://kotlinlang.org logo
#compose
Title
# compose
b

bohregard

07/24/2020, 10:14 PM
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

jim

07/24/2020, 10:18 PM
is it in your module's build.gradle as oppose to your project's build.gradle?
b

bohregard

07/24/2020, 10:18 PM
it’s in the app’s build gradle
Does it need to be top level?
j

jim

07/24/2020, 10:20 PM
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

bohregard

07/24/2020, 10:20 PM
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

jim

07/24/2020, 10:21 PM
👍
t

Timo Drick

07/26/2020, 11:11 AM
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.
3 Views