Thread
#compose
    a

    alorma

    1 year ago
    • IS anyone else getting:
    Duplicate class androidx.compose.animation.AlignmentBasedSizeAnimation found in modules animation-1.0.0-alpha11-runtime (androidx.compose.animation:animation:1.0.0-alpha11) and animation-debug-runtime (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build141)
    ????
    jim

    jim

    1 year ago
    org.jetbrains.compose.animation:animation-android-debug:0.3.0-build141
    is published by Jetbrains and
    animation-1.0.0-alpha11-runtime
    is published by Google. You want to include one of those but not both. If you're trying to do an MPP project (Desktop+Android), you will want to be using the same libraries as published by Jetbrains instead of the ones published by Google.
    Jetbrains publishes the same binaries but with different version numbers, so anything in the Compose/Google maven repository should also be available via the Jetbrains repository under a different artifact name/version.
    a

    alorma

    1 year ago
    uhmmm
    I',m using a MPP library, so i should use all components from jetbrains?
    jim

    jim

    1 year ago
    all of your Compose dependencies should be the ones published by Jetbrains, yes. Jetbrains does releases more frequently than we do, so they already have more up-to-date binaries.
    a

    alorma

    1 year ago
    uhmmm
    how can i setup it on a simple android project, then? :S
    jim

    jim

    1 year ago
    on a simple android non-mpp project? Or a simple android project using MPP?
    a

    alorma

    1 year ago
    second one
    jim

    jim

    1 year ago
    Have you seen:https://github.com/JetBrains/compose-jb/tree/master/examples/imageviewer It has an example MPP project that builds for both Desktop and Android.
    a

    alorma

    1 year ago
    In fact, it's a simple android, using google libs, with one dependency that is mpp
    (m own dep)
    jim

    jim

    1 year ago
    In fact, it's a simple android, using google libs, with one dependency that is mpp
    Sorry, I'm not sure I understand, can you elaborate a bit more?
    a

    alorma

    1 year ago
    Android app that uses google compose dependencies. It uses a library that is built with jetbrain compose dependencies
    jim

    jim

    1 year ago
    Yeah, that is tricky at the moment, especially since the jetbrains and google builds are slightly time dilated. I think there is a way to force gradle to satisfy some dependencies using a different artifact, which may work for you (you could force android to use the android-variants published by jetbrains, or force the mpp library to consume the google binaries), but it would be a little hacky in the short term.  We are working on a better long-term solution, but that is probably at least six months out.
    a

    alorma

    1 year ago
    Ouch
    as it's a library for developers, i can wait for it