I`m struggling getting my project build using coro...
# compose
a
I`m struggling getting my project build using coroutines in kotlin native and jetpack compose in android.
s
Maybe try version
1.4.3
?
a
Everything build & runs fine but as soon i add :
Copy code
val commonMain by getting {
    dependencies {
        implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3-native-mt") {
            version {
                strictly("1.4.3-native-mt")
            }
        }
    }
}
Build fails with:
Copy code
Execution failed for task ':androidApp:checkDebugAarMetadata'.
        > Could not resolve all files for configuration ':androidApp:debugRuntimeClasspath'.
        > Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-core:{strictly 1.4.3-native-mt}.
Required by:
project :androidApp > project :shared
        > Cannot find a version of 'org.jetbrains.kotlinx:kotlinx-coroutines-core' that satisfies the version constraints:
Dependency path 'MyApp:androidApp:unspecified' --> 'MyApp:shared:unspecified' (debugRuntimeElements) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:{strictly 1.4.3-native-mt}'
Dependency path 'MyApp:androidApp:unspecified' --> 'androidx.compose.ui:ui:1.0.0-beta06' (releaseRuntimePublication) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3'
Dependency path 'MyApp:androidApp:unspecified' --> 'androidx.compose.runtime:runtime:1.0.0-beta06' (releaseRuntimePublication) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3' (runtimeElements) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3'
Dependency path 'MyApp:androidApp:unspecified' --> 'androidx.compose.ui:ui:1.0.0-beta06' (releaseRuntimePublication) --> 'androidx.compose.animation:animation-core:1.0.0-beta06' (releaseRuntimePublication) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3'
Can someone point me in the right direction ? 🙏
Got it working using the deprecated isForce:
Copy code
val commonMain by getting {
            dependencies {
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3-native-mt") {
                    isForce = true
                }
            }
        }
👍 1
s
Would you mind sharing the whole file?
a
Here you go
😊 1