Jishin Dev [JD]
10/16/2021, 2:48 PMOriginally shared in #multiplatform.Seeing this compiler
BackendException
on AS when building a multi module KMM project which uses Jetpack compose
org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
and this as render problems when preview tries to load in between
java.lang.NoSuchMethodError: 'void androidx.compose.material.TextKt.Text...'
Found a few other people who had the same issue here, on the issuetracker and even on SOF but none of the solutions that worked for them, worked for me unfortunately.
More details in the 🧵 .Jishin Dev [JD]
10/16/2021, 2:48 PMAndroid Studio Bumblebee | 2021.1.1 Beta 1
gradle plugin - 7.1.0-beta01 | wrapper - 7.2
kotlin - 1.5.31
compose - 1.1.0-alpha06
Project structure-
Proj
----buildSrc
----kmmApp
----------androidApp // includes compose
----------iosApp
----------shared
-------------androidMain
-------------iosMain
-------------commonMain
----kmmLib1
----------androidMain // includes compose
----------iosMain
----------commonMain
----kmmLib2
----------androidMain
----------iosMain
----------commonMain
----settings.gradle.kts // include(":kmmApp:shared", ":kmmApp:androidApp", "kmmLib1", "kmmLib2")
So far I’ve tried -
• Since I was using buildSrc
, added the fix suggested here
• added this to all modules
buildFeatures.compose = true
composeOptions.kotlinCompilerExtensionVersion = "1.1.0-alpha06"
• Multiple rounds of clean, rebuild and Invalidate caches, even a system reboot to see if I’d get lucky.
• Add remove compose and build as @Marko Novakovic suggested.
• switched to stable compose 1.0.4
Marko Novakovic
10/16/2021, 3:10 PMCompose
to existing Android app. I was stuck with this for 2-3 weeksMarko Novakovic
10/16/2021, 3:11 PMCompose
over and over again and it worked somehow even tho working project and project with error looked completely the same….Jishin Dev [JD]
10/16/2021, 3:15 PMandroidApp
module. 🥲 . Cancelling the build also runs indefinitely. Force quitting AS and trying again. Update: Got Timeout waiting to lock file hash cache
error after reopening AS, so deleted gradle caches and rebuilding again.Jishin Dev [JD]
10/16/2021, 4:44 PMJishin Dev [JD]
10/16/2021, 4:47 PMNoSuchMethodError: No static method setContent
Marko Novakovic
10/16/2021, 5:51 PMJishin Dev [JD]
10/17/2021, 5:57 AMJishin Dev [JD]
10/17/2021, 10:17 AMmain
.Jishin Dev [JD]
10/20/2021, 6:01 AM