hellman
03/07/2025, 7:14 AMjvm("desktop")
)?hellman
03/07/2025, 7:54 AMSuppressed: java.lang.IllegalStateException: Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used
As far as I know, I'm not including coroutines-android
myself. Any usual suspect that might be including it?Arne Jans
03/07/2025, 8:16 AM./gradlew app:dependencies
(or similar according to your project-structure)?
I don't know about CMP, but this is what I usually do in an android-project in such a case.Arne Jans
03/07/2025, 8:32 AMorg.jetbrains.kotlinx:kotlinx-coroutines-bom
directly or indirectly? It might get pulled in by org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm
according to my dependency-tree:
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.10.1
\--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.10.1
+--- org.jetbrains:annotations:23.0.0
+--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.10.1
| +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.1 (c)
| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.10.1 (c)
| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1 (c)
| +--- org.jetbrains.kotlinx:kotlinx-coroutines-test-jvm:1.10.1 (c)
| +--- org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.1 (c)
| \--- org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.10.1 (c)
Arne Jans
03/07/2025, 8:33 AMhellman
03/07/2025, 8:44 AMArne Jans
03/07/2025, 8:45 AM(c)
behind it marks just a constraint in the BOM, it might not mean it is pulling the actual dependency in, if I understand it correctly.hellman
03/07/2025, 8:45 AMArne Jans
03/07/2025, 8:49 AMconfigurations {
runtime.exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-android"
}
This is discussed here: https://stackoverflow.com/questions/21764128/how-do-i-exclude-all-instances-of-a-transitive-dependency-when-using-gradlehellman
03/07/2025, 8:50 AMArne Jans
03/07/2025, 8:54 AMArne Jans
03/07/2025, 8:57 AMArne Jans
03/07/2025, 9:02 AMPablichjenkov
03/07/2025, 12:13 PMhellman
03/07/2025, 12:16 PMPablichjenkov
03/07/2025, 12:21 PMArne Jans
03/07/2025, 1:17 PMgit bisect
. You go back in your git-history, mark a specific git-commit as working, and the head-commit as bad, and then it does a binary search to find the breaking commit.hellman
03/07/2025, 1:23 PMjvm("desktop")
. git bisect doesn't really help herePablichjenkov
03/07/2025, 2:03 PMArne Jans
03/07/2025, 2:04 PMhellman
03/07/2025, 2:07 PM