Hello,
why do i get “Caused by: java.lang.NoClassDefFoundError: android/os/Looper” when trying to use coroutine on a Desktop target
The only dependency in my project in shared module is
implementation(“org.jetbrains.kotlinxkotlinx coroutines core1.7.1")
The code works fine in Android but crashes in Desktop
a
Alexander Maryanovsky
05/15/2023, 7:39 AM
Looper is an Android thing. You must have some dependency on Android it.
p
Prateek Kumar
05/16/2023, 2:48 AM
@Alexander Maryanovsky I didn’t have any android dependency , but after adding
org.jetbrains.kotlinx:kotlinx-coroutines-swing
it got fixed
But this was kinda hard to find as it is hardly mentioned anywhere i guess