kizitonwose / Calendar

A highly customizable calendar view and compose library for Android.
MIT License
4.5k stars 492 forks source link

Desugaring required even if the min sdk is set to 28 (MultiModule project) #549

Closed angolo closed 2 weeks ago

angolo commented 1 month ago

I'm using the compose lib, even if in my multi-module project all gradle files defines min sdk as 28 on the build process i get this error:

Dependency 'com.kizitonwose.calendar:compose:2.5.1' requires core library desugaring to be enabled
      for :app.

after using desugaring I get the same a crash on the composable function that uses the lib:

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/foundation/gestures/snapping/SnapPositionInLayout; at com.kizitonwose.calendar.compose.CalendarDefaultsKt.access$CalendarSnapPositionInLayout(CalendarDefaults.kt:1) . . . . Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.compose.foundation.gestures.snapping.SnapPositionInLayout" on path: DexPathList[[dex file "/data/data/mypackage/code_cache/.overlay/base.apk/classes18.dex", dex file at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) ... 37 more

MAshhal commented 1 month ago

I'm also experiencing this same Error Message

It occurs whenever I change my material3's dependency version to an alpha/beta version which bumps all the other compose dependencies reliant on the compose BOM

kizitonwose commented 1 month ago

Compose 1.7.0-beta01 support is now available in version 2.6.0-beta01

kizitonwose commented 1 month ago

Desugaring required even if the min sdk is set to 28 (MultiModule project

Regarding this, see my comment here.

kizitonwose commented 2 weeks ago

Desugar dependency has been removed from the library in version 2.5.2 for Compose UI 1.6, and version 2.6.0-beta02 for Compose UI 1.7 beta.