Closed gdm1995 closed 1 year ago
What else from Compose do you have in your build file? Do you use an earlier version of Compose dependencies anywhere else?
It's a brand new project creted with the latest version of IntelliJ. File -> New -> Project -> Compose Multiplatform. In PlatformI've selected : Desktop. The only difference I've made is to import the library. Here's the build.gradle.kts:
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose")
}
group = "com.example.test"
version = "1.0-SNAPSHOT"
repositories {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
kotlin {
jvm {
jvmToolchain(11)
withJava()
}
sourceSets {
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation("org.jetbrains.compose.material3:material3-desktop:1.5.0-beta02")
}
}
val jvmTest by getting
}
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "Test"
packageVersion = "1.0.0"
}
}
}
What do you have as "compose.version" in "gradle.properties" file?
kotlin.code.style=official kotlin.version=1.8.0 agp.version=7.3.0 compose.version=1.3.0
That's your answer. You're mixing 1.3.0 and 1.5.0-rc02. These are not compatible. You can't pick and choose some parts. Everything needs to be on the same version.
My bad. I was lucky that the 1.4.3 was compatible until now. Thanks for your help. I'm sorry for my silly mistake.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug I would like to apply the date and time pickers released in version 1.5.0-beta02. However, there are no working versions for desktop projects other than 1.4.3 and older.
Affected platforms Select one of the platforms below:
Versions
To Reproduce Steps and/or the code snippet to reproduce the behavior:
Expected behavior The desktop platform working on version 1.5.0 releases.
Screenshots
Additional context The Exception for a new project:
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void org.jetbrains.skia.CanvasKt._nTranslate(long, float, float)' at org.jetbrains.skia.CanvasKt._nTranslate(Native Method) at org.jetbrains.skia.CanvasKt.access$_nTranslate(Canvas.kt:1) at org.jetbrains.skia.Canvas.translate(Canvas.kt:1085) at androidx.compose.ui.graphics.SkiaBackedCanvas.translate(SkiaBackedCanvas.skiko.kt:84) at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:357) at androidx.compose.ui.node.LayoutNode.draw$ui(LayoutNode.kt:922) at androidx.compose.ui.platform.SkiaBasedOwner.draw(SkiaBasedOwner.skiko.kt:352) at androidx.compose.ui.ComposeScene.render(ComposeScene.skiko.kt:463) at androidx.compose.ui.awt.ComposeBridge$skikoView$1$onRender$1.invoke(ComposeBridge.desktop.kt:153) at androidx.compose.ui.awt.ComposeBridge$skikoView$1$onRender$1.invoke(ComposeBridge.desktop.kt:152) at androidx.compose.ui.awt.ComposeBridge.catchExceptions(ComposeBridge.desktop.kt:126) at androidx.compose.ui.awt.ComposeBridge.access$catchExceptions(ComposeBridge.desktop.kt:59) at androidx.compose.ui.awt.ComposeBridge$skikoView$1.onRender(ComposeBridge.desktop.kt:152) at org.jetbrains.skiko.SkiaLayer.update$skiko(SkiaLayer.awt.kt:548) at org.jetbrains.skiko.redrawer.AWTRedrawer.update(AWTRedrawer.kt:54) at org.jetbrains.skiko.redrawer.Direct3DRedrawer.redrawImmediately(Direct3DRedrawer.kt:73) at org.jetbrains.skiko.SkiaLayer.paint(SkiaLayer.awt.kt:388) at androidx.compose.ui.awt.WindowComposeBridge$component$1.paint(WindowComposeBridge.desktop.kt:59) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at androidx.compose.ui.window.Window_desktopKt$Window$12$1.invoke(Window.desktop.kt:430) at androidx.compose.ui.window.Window_desktopKt$Window$12$1.invoke(Window.desktop.kt:416) at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$3.invoke(AwtWindow.desktop.kt:82) at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$3.invoke(AwtWindow.desktop.kt:80) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$1.invoke(UpdateEffect.desktop.kt:59) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$1.invoke(UpdateEffect.desktop.kt:55) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2300) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:471) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:234) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke$performUpdate(UpdateEffect.desktop.kt:55) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke(UpdateEffect.desktop.kt:64) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke(UpdateEffect.desktop.kt:47) at androidx.compose.runtime.DisposableEffectImpl.onRemembered(Effects.kt:81) at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1137) at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:828) at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:849) at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:1041) at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:520) at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:219) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Process finished with exit code 1