When I make a new compose multiplatform app using ...
# compose
d
When I make a new compose multiplatform app using the wizard, and select desktop, I get the following error when I run the project: Exception in thread "main" java.lang.NoClassDefFoundError: androidx/collection/ScatterMapKt at androidx.compose.runtime.collection.ScopeMap.<init>(ScopeMap.kt:26) at androidx.compose.runtime.CompositionImpl.<init>(Composition.kt:479) at androidx.compose.runtime.CompositionImpl.<init>(Composition.kt:434) at androidx.compose.runtime.CompositionKt.Composition(Composition.kt:335) at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:217) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) Caused by: java.lang.ClassNotFoundException: androidx.collection.ScatterMapKt at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 20 more so the desktop seems to depend on the androidx collections? Is this intentional or a bug?
z
Please keep long code snippets and stack traces to the thread to keep the main channel more readable.
ScatterMap
is defined in common source, it’s just in a package named androidx. I’m guessing you have a version mismatch
👆 1
a
I’m seeing the same. Oddly though if I package it with
./gradlew desktopApp:packageDistributionForCurrentOS
, install and run, its fine 😕
l
572 Views