Joe
09/11/2018, 3:33 PMlaunch(UI)
in it, but I'm getting the following message
java.lang.NoClassDefFoundError: Could not initialize class kotlinx.coroutines.experimental.android.HandlerContextKt
julioyg
09/12/2018, 8:17 AMclass MyClass(cc: coroutineContexts) {
fun myMethod() {
launch(cc.ui) {
}
}
}
interface CoroutineContexts {
val ui: CourotineContext
}
class Test {
private val mockedCoroutines = object: CoroutineContexts {
override val ui = Unconfined
}
private val sut = MyClass(mockedCoroutines)
fun test() {
//test
}
}
hope it helpsJoe
09/12/2018, 8:19 AM