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

Vivek Sharma

11/12/2020, 11:44 AM
Hey devs, I was trying compose navigation, and I added the
implementation "androidx.navigation:navigation-compose:1.0.0-alpha01"
and I didnt write any code in main activity except the code which is generated at build of new project and app didnt run Logcat showing :
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/foundation/Background;
at androidx.compose.foundation.BackgroundKt.background-1xq40Q0(Background.kt:44)
at androidx.compose.material.SurfaceKt.Surface-biUpMIw(Surface.kt:101)
s

sindrenm

11/12/2020, 11:45 AM
If you've updated to compose-* alpha07, then you'll probably also need to update to navigation-compose alpha02. Just FYI. simple smile
v

Vivek Sharma

11/12/2020, 11:51 AM
is navigation-compose alpha02 out ?
@sindrenm I tried alpha02 and it didnt do anything
s

sindrenm

11/12/2020, 12:18 PM
Yeah, got released together with alpha07. I'm not using navigation-compose myself, though, so I don't think I can help much more, I just reckon you might need to keep these versions in sync now in the alpha period.
v

Vivek Sharma

11/12/2020, 12:34 PM
Thanks fixed, yeah navigation I guess doesnt work with compose04
or below 06
s

sindrenm

11/12/2020, 3:55 PM
Oh, right! Yeah, that also makes sense, I guess. Glad to see you figured it out. simple smile
5 Views