Daniele B
03/18/2024, 4:24 PMException in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'
at kotlinx.coroutines.internal.MainDispatchersKt.throwMissingMainDispatcherException(MainDispatchers.kt:77)
at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.missing(MainDispatchers.kt:108)
at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.isDispatchNeeded(MainDispatchers.kt:92)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:315)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:21)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:88)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:123)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:52)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:43)
at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
any idea how to solve this?Garret Yoder
03/18/2024, 4:26 PMkotlinx-coroutines-jvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
Daniele B
03/18/2024, 4:35 PMGarret Yoder
03/18/2024, 4:49 PMDaniele B
03/18/2024, 4:50 PMGarret Yoder
03/18/2024, 4:52 PMDaniele B
03/18/2024, 5:40 PMDaniele B
03/18/2024, 5:44 PMDaniele B
03/18/2024, 5:45 PMalbrechtroehm
03/29/2024, 3:18 PMDaniele B
03/29/2024, 4:17 PMalbrechtroehm
03/29/2024, 4:20 PMalbrechtroehm
03/29/2024, 4:59 PMopen class ViewModel {
protected val viewModelScope = CoroutineScope(Dispatchers.Default + SupervisorJob())
}
Pedro Romano Barbosa
04/02/2024, 12:18 AMdesktopMain.dependencies { ... }
Here?Daniele B
04/02/2024, 10:41 AM