I have the desktop client building and running now...
# compose-desktop
a
I have the desktop client building and running now, however when I go to build the Android client, I get a raft of duplicate class errors. I've been poking around at the dependencies for a while but can't make any progress, anyone run into this before? this repo: https://github.com/Wavesonics/notional
Copy code
Duplicate class androidx.compose.animation.AlignmentBasedSizeAnimation$animateTo$1 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AlignmentBasedSizeAnimation$offset$1 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimStates found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt$AnimatedVisibility$1 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt$AnimatedVisibility$2 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt$AnimatedVisibility$3 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt$AnimatedVisibilityImpl$1 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt$AnimatedVisibilityImpl$2 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt$AnimatedVisibilityImpl$2$1 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt$AnimatedVisibilityImpl$3 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
  Duplicate class androidx.compose.animation.AnimatedVisibilityKt$AnimatedVisibilityImpl$animations$1$1 found in modules animation-1.0.0-alpha12-runtime.jar (androidx.compose.animation:animation:1.0.0-alpha12) and animation-debug-runtime.jar (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build152)
🧵 1
s
That's probably because you're using the
"androidx.compose.*"
dependencies instead of
compose.*
in your android build.gradle.
a
ok, so that certainly fixes that problem.
huh but I need
setContent
which it now tells me is internal
Cannot access 'setContent': it is internal in 'androidx.compose.ui.platform'
k
I’m just starting this myself but I would think that if you are in the Android project, you should use Android compose, not desktop
🚫 1
I’m using Android compose and it’s working great
s
I believe the exclude workaround should not be necessary when a newer build arrives. The compose plugin now handles it itself.
👌 1
a
ya the whole multiplatform compose is... very early. i've been banging my head against it all day
j
The whole multiplatform configuration is complicated to configure in large part because widgets which publish dependencies on Google's binaries are incompatible with widgets which publish dependencies on the Jetbrains binaries (you can work around this by using only widgets/libraries intended for desktop, or by oftentimes you can use exclude rules to force libraries to work). This is a known issue, and one we're working hard to resolve, but there are some logistical intricacies and processes that we need to go through so it may take a bit of time.
a
oh got ya, okay
j
@jim is there a Google or GitHub issue open about this? I am looking for it with no luck
j
We're still working on a better long term fix for this, but it is temporarily mitigated by https://github.com/JetBrains/compose-jb/commit/d26c8f5c153d277923959a9285d727a5d85aae4c I don't think we had a public issue for this, so I went ahead and created one: https://issuetracker.google.com/issues/187071114 FWIW, this is a high-priority item for us, and it has an internal roadmap dates attached to it, but it takes time as there are a bunch of logistical intricacies and processes that we need to go through.
👍 2
🙏 1
j
Thank you for the detailed info Jim :)