Giter VIP home page Giter VIP logo

Comments (6)

JuBan1 avatar JuBan1 commented on August 17, 2024 4

Hi there,

I ran across the same problem. I can't provide a minimal example because a freshly created KMP project didn't exhibit the problem. I haven't yet figured out what is different between a fresh project and the one I'm working on where the issue popped up.

But I did find the specific reason, and how to fix it so I think it will be useful to document it here.

The issue is with defaultDraggingModifier. It's set to Modifier.animateItemPlacement() by default but that triggers the crash. If I specifically set defaultDraggingModifier to the same value everything works well.

// Crashes with defaultDraggingModifier commented out. Works with it not commented out.
ReorderableItem(state, key = item, /*defaultDraggingModifier = Modifier.animateItemPlacement()*/) {
    ....
}

So it seems to be some kind of resolution problem with code inside the library module as opposed to code outside. But that's where my findings end.

Setup: KMP with JVM target. Compose 1.2.0-alpha774

from composereorderable.

diousk avatar diousk commented on August 17, 2024 1

@aclassen here is a reproducible project:
https://github.com/diousk/ComposeReorderableIssue

Please help check and reopen this issue.

Thanks

from composereorderable.

aclassen avatar aclassen commented on August 17, 2024

Please provide a minimal example to reproduce your problem.

from composereorderable.

aclassen avatar aclassen commented on August 17, 2024

Please retry using version 0.9.4

from composereorderable.

Tolriq avatar Tolriq commented on August 17, 2024

Here's it's the opposite updating to 0.9.4 brings crash on older Android versions (API < 24)

java.lang.NoSuchMethodError: No static method animateItemPlacement$default(Landroidx/compose/foundation/lazy/LazyItemScope;Landroidx/compose/ui/Modifier;Landroidx/compose/animation/core/FiniteAnimationSpec;ILjava/lang/Object;)Landroidx/compose/ui/Modifier; in class Landroidx/compose/foundation/lazy/LazyItemScope; or its super classes (declaration of 'androidx.compose.foundation.lazy.LazyItemScope'

from composereorderable.

aclassen avatar aclassen commented on August 17, 2024

Fixed in 0.9.5

from composereorderable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.