Hi! I was just updating to Jetbrains Compose 1.12 ...
# compose-desktop
d
Hi! I was just updating to Jetbrains Compose 1.12 and get this:
Copy code
java.lang.NoClassDefFoundError: androidx/compose/ui/platform/CompositionLocals_commonStubsKt
	at _COROUTINE._BOUNDARY._(CoroutineDebugging.kt:42)
	at androidx.compose.ui.test.SkikoComposeUiTest$runTest$1.invokeSuspend(ComposeUiTest.skiko.kt:275)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:317)
Caused by: java.lang.NoClassDefFoundError: androidx/compose/ui/platform/CompositionLocals_commonStubsKt
I already aligned all my
org.jetbrains.compose.*
dependencies according to github.com/JetBrains/compose-multiplatform/…/v1.12.0's "Libraries" section and the
gradle dependencies
output also shows no sign of older (AndroidX) Compose versions than 1.12. What else could I do to debug / fix this issue?
i
Copy code
_commonStubsKt
It seems like your build includes non-android google's stubs instead of JetBrains' Compose Multiplatform libraries. What's your
gradle dependencies
shows exactly?
d
Hi @Ivan Matkov, I pasted the desktop* specfic configurations here:
<https://pastebin.ca/4knCLUzU8A>
Thanks for your support!
i
Thanks. I do not see a reason here 🤔 My assumption was that it somehow has a dependency to
androidx.compose.ui
instead of
org.jetbrains.compose.ui
because
CompositionLocals_commonStubsKt
clearly points to CompositionLocals.commonStubs.kt file in Google repo that contains no implementation and used as "stub" for non android targets. Could you please file an issue to youtrack.jetbrains.com/newIssue?project=CMP with reproduction, so the team can a look at it in details?
d
Ok, I think the culprit was that I previously copied the
Flow.flowWithLifecycle
implementation over from AndroidX to Desktop because it was not available back in the day for that platform. By removing this and using the AndroidX-supplied variant for Desktop the error is gone.
Thanks for your support! You pointed me into the right direction.
kodee loving 1