https://kotlinlang.org logo
#coroutines
Title
# coroutines
d

Drew

01/22/2019, 4:39 PM
I have a simple question regarding coroutines, if anyone could help me. I must be missing something... Kotlin MPP project, using following dependencies, I am unable to resolve
runBlocking
at all:
Copy code
commonMain.dependencies {
            implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
            implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.9.1"
            implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0'
            implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.1.0'
        }

        androidMain.dependencies {
            implementation 'org.jetbrains.kotlin:kotlin-stdlib'
            implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.0'
        }

        iosMain.dependencies {
            implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:0.9.1"
            implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.1.0'
        }
Also, using Kotlin 1.3.11
v

Vsevolod Tolstopyatov [JB]

01/22/2019, 4:42 PM
runBlocking
is not present in
common
because it is not implemented on JS
d

Drew

01/22/2019, 4:44 PM
Ah--okay. Thank you! Makes sense.
7 Views