oleksandrbalan / lazytable

Lazy layout to display columns and rows of data on the two directional plane.
Apache License 2.0
261 stars 12 forks source link

Crash with Compose 1.5.0-beta01 #4

Closed Tgo1014 closed 10 months ago

Tgo1014 commented 1 year ago

When trying to add a LazyTable the app crashes with:

java.lang.AbstractMethodError: abstract method "void androidx.compose.foundation.lazy.layout.LazyLayoutItemProvider.Item(int, java.lang.Object, androidx.compose.runtime.Composer, int)"
 at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$SkippableItem$1.invoke(LazyLayoutItemContentFactory.kt:138)
 at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$SkippableItem$1.invoke(LazyLayoutItemContentFactory.kt:137)
 at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
 at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
 at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
 at androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider(SaveableStateHolder.kt:84)
 at androidx.compose.foundation.lazy.layout.LazySaveableStateHolder.SaveableStateProvider(LazySaveableStateHolder.kt:84)
 at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt.SkippableItem-JVlU9Rs(LazyLayoutItemContentFactory.kt:137)
 at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt.access$SkippableItem-JVlU9Rs(LazyLayoutItemContentFactory.kt:1)                                                                                      
GuilhE commented 1 year ago

Having the same problem 😞 . Using compose 1.6.0-alpha01. Also, I can see this in the error logs:

at eu.wewox.minabox.MinaBoxKt$MinaBox$1.invoke-0kLqBqw(MinaBox.kt:84)
at eu.wewox.minabox.MinaBoxKt$MinaBox$1.invoke(MinaBox.kt:59)

Don't know if the error is related to this lib or it's parent. Will open also an issue in mina.

GuilhE commented 12 months ago

I believe this fixes this issue: https://github.com/oleksandrbalan/minabox/pull/8

GuilhE commented 12 months ago

@Tgo1014 see if this helps in your code: https://github.com/oleksandrbalan/minabox/pull/8#issuecomment-1634403568

Tgo1014 commented 12 months ago

@GuilhE Thanks! I'll give it a try later 🙏🏽

GuilhE commented 11 months ago

@Tgo1014 published a new version with compose compiler 1.5.0 stable: https://github.com/oleksandrbalan/minabox/pull/8#issuecomment-1641768481

Tgo1014 commented 11 months ago

Thanks for your work @GuilhE! Great stuff!

oleksandrbalan commented 10 months ago

@GuilhE Thank you for your time and PR, it indeed fixes the problem, but I am planning to move to Compose Multiplatform, which is now capped on Compose 1.4.3. You could fork the library and update it for your needs, as I do not plan to publish also beta library versions.

When the new Compose Multiplatform version will be release I will release a new version with your fix.

Monabr commented 10 months ago

@GuilhE how yo fix the issue? You write about not this project and share the link not for this repo.

GuilhE commented 10 months ago

@GuilhE how yo fix the issue? You write about not this project and share the link not for this repo.

Check this: https://github.com/oleksandrbalan/minabox/pull/8#issuecomment-1641768481

Monabr commented 10 months ago

A more accurate answer would be:

implementation ('io.github.oleksandrbalan:lazytable:1.4.0') {
        exclude(group: "io.github.oleksandrbalan", module: "minabox")
}
implementation("com.github.GuilhE:minabox:1.0.0-sign-disabled")
oleksandrbalan commented 10 months ago

Should be fixed now with new 1.5.0 release.