But the fetcher call cannot resolve launch, runBlo...
# multiplatform
s
But the fetcher call cannot resolve launch, runBlocking, async, or anything in kotlinx.coroutines. Any ideas?
s
This really should be in an FAQ.
runBlocking
isn’t in coroutines-common because there isn’t a version of it possible in javascript. You can use expect/actual with typeAlias on the iOS and Android platforms.
r
You also probably need
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.4")
in your Android dependencies.
s
Thanks, I was able to get it to build by putting the code into the android actual.kt, but then i went to test the library in an android app and I get this error:
Copy code
java.lang.NoClassDefFoundError: Failed resolution of: Lio/ktor/client/HttpClientJvmKt;
nm, i figured it out, thanks guys
i just had to add some dependencies into the app i was importing my library into
👍 1