https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Shawn Karber_

03/12/2020, 9:05 PM
But the fetcher call cannot resolve launch, runBlocking, async, or anything in kotlinx.coroutines. Any ideas?
s

Sam

03/12/2020, 9:24 PM
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

russhwolf

03/12/2020, 9:32 PM
You also probably need
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.4")
in your Android dependencies.
s

Shawn Karber_

03/13/2020, 12:07 AM
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
12 Views