cah
04/21/2022, 3:38 PMfun CoroutineScope.launchIO(block: suspend CoroutineScope.() -> Unit): Job {
return launch(
context = IO,
start = CoroutineStart.DEFAULT,
block = block
)
}
If I try to use this in place of the regular launch I get the following error:
java.lang.NoSuchMethodError: 'kotlinx.coroutines.Job com.some.misc.ExtensionsKt.launchIO(kotlinx.coroutines.CoroutineScope, kotlin.jvm.functions.Function2)'
I am more curious as to what I'm missing here rather than this being a serious use caseJoffrey
04/21/2022, 4:12 PMNoSuchMethodError usually sounds like the runtime classpath is missing something that was there at compile time. How are you compiling and running this code and the code that calls it?cah
04/21/2022, 4:18 PMJoffrey
04/21/2022, 4:50 PMlaunchIO is declared as compileOnly dependency of the module using it?julian
04/22/2022, 5:20 PM