i am working on a multiplatform project and for so...
# multiplatform
j
i am working on a multiplatform project and for some reason my android builds are pulling in a desktop version of a library. i get an error
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/foundation/lazy/layout/Lazy_desktopKt
is there a way to see whats making this happen?
this wasn't a problem when i had the project as a submodule but i've since deployed to github packages so i'm not sure if this is a problem with github packages, a problem with how i deployed, or a build problem
z
Any chance one of your libraries is just a jvm project and pulling in that to android? I’ve made that mistake before with an annotations artifact
j
not that i can tell. and in my github packages I can see that i have a
-android
,
-android-debug
, and a
-jvm
version
not sure if this matters but the failure is within an internal library
Copy code
MyApp
|- LibraryA
     |= LibraryB
so both LibraryA and LibraryB have jvm and android targets, and the library thats returning the error is LibraryB
z
Peek at the dependencies task? That’s how I root caused mine
j
hmm, so it does look like it my project its pulling in
org.jetbrains.compose.foundation:foundation-desktop:1.4.0-dev-wasm09
in the android source set
which is weird cause even when i remove the jvm version and just leave an android target from
LibraryB
it still is bringing in the desktop version
and that was it, i have to force it to use the 1.4.0 version for compose stuff so the pom file properly redirects
thank you for the rubber ducking 🙂
z
+rubber duck