Andre

    Andre

    1 year ago
    I`m struggling getting my project build using coroutines in kotlin native and jetpack compose in android.
    s

    Se7eN

    1 year ago
    Maybe try version
    1.4.3
    ?
    Andre

    Andre

    1 year ago
    Everything build & runs fine but as soon i add :
    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:
    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:
    val commonMain by getting {
                dependencies {
                    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3-native-mt") {
                        isForce = true
                    }
                }
            }
    s

    ste

    1 year ago
    Would you mind sharing the whole file?
    Andre

    Andre

    1 year ago