Melchior Grutzmann
06/08/2024, 1:18 PMWARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
I have 2 questions: 1) What is the development level of Desktop Compose (for MacOS), is it still alpha?
2) How do I fix the above problem: Gemini suggests to implement MyApplication
that implements the NSApplicationDelegate
but when I copy this code into the src/main/kotlin/Main.kt, the NSApplication
and NSApplicationDelegate
are unknown and there is no suggestion from where to import them.
The generated project uses "org.jetbrains.compose.uidesktop ui1.6.10". (Please let me know if I should post the generated code. I am using IntelliJ Ultimate 2024.1.2 on arm64 MacOS.)
Thanks for suggestions
MelchiorKonstantin Tskhovrebov
06/08/2024, 1:22 PMMelchior Grutzmann
06/08/2024, 1:26 PMKonstantin Tskhovrebov
06/08/2024, 1:30 PMKonstantin Tskhovrebov
06/08/2024, 1:30 PMMelchior Grutzmann
06/08/2024, 1:48 PM2024-06-08 15:47:05.315 java[51652:11244065] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
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:219)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
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:526)
... 20 more
Process finished with exit code 1
Maybe, the problem is some missing / renamed class in the NSUIKit?Pau Marzo
06/08/2024, 2:22 PMMelchior Grutzmann
06/08/2024, 2:27 PMMelchior Grutzmann
06/08/2024, 2:29 PM