compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Error building a sample app for iOS - Module runtime-saveable has a reference to symbol androidx.compose.runtime/remember|-2215966373931868872[0]

Open arkivanov opened this issue 2 years ago • 5 comments

I'm trying to add support of Compose for iOS to the Decompose Counter sample. The app runs just fine using the task iosDeployIPhone12ProDebug. However ./gradlew build fails with the following error.

e: Module "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64)" has a reference to symbol androidx.compose.runtime/remember|-2215966373931868872[0]. Neither the module itself nor its dependencies contain such declaration.

Kotlin: 1.6.21 Gradle: 7.3.3 Compose: 1.2.0-alpha01-dev675

Details
> Task :sample:counter:app-darwin-compose:linkDebugExecutableUikitX64
e: Module "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64)" has a reference to symbol androidx.compose.runtime/remember|-2215966373931868872[0]. Neither the module itself nor its dependencies contain such declaration.

This could happen if the required dependency is missing in the project. Or if there is a dependency of "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64)" that has a different version in the project than the version that "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.2.0-alpha01-dev675" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.

The list of "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.2.0-alpha01-dev675" dependencies that may lead to conflicts:
1. "stdlib: 1.6.20" (was initially compiled with "stdlib: 1.6.0")
2. "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.20" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.0")
3. "org.jetbrains.kotlin.native.platform.darwin: 1.6.20" (was initially compiled with "org.jetbrains.kotlin.native.platform.darwin: 1.6.0")
4. "org.jetbrains.kotlin.native.platform.posix: 1.6.20" (was initially compiled with "org.jetbrains.kotlin.native.platform.posix: 1.6.0")
5. "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.2" (was initially compiled with "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.0")
6. "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.0" (was initially compiled with "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64)")

Project dependencies:
+--- org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitx64): 1.2.0-alpha01-dev675
|    +--- org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitx64): 1.2.0-alpha01-dev675
|    |    +--- org.jetbrains.compose.animation:animation-core (org.jetbrains.compose.animation:animation-core-uikitx64): 1.2.0-alpha01-dev675
|    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    +--- stdlib: 1.6.21 -> 1.6.20
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.6.20
|    |    |    |    |    +--- stdlib: 1.6.20
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.20
|    |    |    |    |    |    +--- stdlib: 1.6.20
|    |    |    |    |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.6.20
|    |    |    |    |    |         \--- stdlib: 1.6.20
|    |    |    |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.6.20 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.6.20 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.6.20 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.2
|    |    |    |    |    +--- stdlib: 1.6.20
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.20 (*)
|    |    |    |    |    \--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.2
|    |    |    |    |         +--- stdlib: 1.6.20
|    |    |    |    |         \--- org.jetbrains.kotlin.native.platform.posix: 1.6.20 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.2 (*)
|    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.0
|    |    |    |         +--- stdlib: 1.6.0 -> 1.6.20
|    |    |    |         +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.0 -> 1.6.20 (*)
|    |    |    |         +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.0 -> 1.6.20 (*)
|    |    |    |         +--- org.jetbrains.kotlin.native.platform.posix: 1.6.0 -> 1.6.20 (*)
|    |    |    |         +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.0 -> 0.17.2 (*)
|    |    |    |         \--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.2 (*)
|    |    |    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    +--- org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    |    ^^^ This module requires symbol androidx.compose.runtime/remember|-2215966373931868872[0].
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    +--- stdlib: 1.6.21 -> 1.6.20
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.6.20 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.6.20 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.6.20 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): unknown -> 0.17.2 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.2 (*)
|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): unknown -> 1.6.0 (*)
|    |    |    |    +--- org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    +--- org.jetbrains.compose.ui:ui-graphics (org.jetbrains.compose.ui:ui-graphics-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    |    +--- org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    |    \--- org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.16
|    |    |    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib: 1.6.10
|    |    |    |    |         |    \--- org.jetbrains:annotations: 13.0
|    |    |    |    |         \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.5.2 -> 1.6.0 (*)
|    |    |    |    +--- org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    |    ^^^ This module requires symbol androidx.compose.runtime/remember|-2215966373931868872[0].
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-graphics (org.jetbrains.compose.ui:ui-graphics-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    |    +--- org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.16 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.2 (*)
|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.0 (*)
|    |    |    |    +--- org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    |    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    |    |    |    +--- org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.16 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.2 (*)
|    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.0 (*)
|    |    |    +--- org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.0 (*)
|    |    +--- org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitx64): 1.2.0-alpha01-dev675
|    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    +--- org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitx64): 1.2.0-alpha01-dev675 (*)
|    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    +--- org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitx64): 1.2.0-alpha01-dev675 (*)
|    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
|    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.0-alpha01-dev675 (*)
|    +--- org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitx64): 1.2.0-alpha01-dev675 (*)
|    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
|    \--- org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.16 (*)
\--- org.jetbrains.compose.material:material (org.jetbrains.compose.material:material-uikitx64): 1.2.0-alpha01-dev675
     +--- org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitx64): 1.2.0-alpha01-dev675 (*)
     +--- org.jetbrains.compose.animation:animation-core (org.jetbrains.compose.animation:animation-core-uikitx64): 1.2.0-alpha01-dev675 (*)
     +--- org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitx64): 1.2.0-alpha01-dev675 (*)
     +--- org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitx64): 1.2.0-alpha01-dev675 (*)
     +--- org.jetbrains.compose.material:material-icons-core (org.jetbrains.compose.material:material-icons-core-uikitx64): 1.2.0-alpha01-dev675
     |    \--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.0-alpha01-dev675 (*)
     +--- org.jetbrains.compose.material:material-ripple (org.jetbrains.compose.material:material-ripple-uikitx64): 1.2.0-alpha01-dev675
     |    +--- org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitx64): 1.2.0-alpha01-dev675 (*)
     |    +--- org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitx64): 1.2.0-alpha01-dev675 (*)
     |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
     |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675
     +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.0-alpha01-dev675 (*)
     +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.0-alpha01-dev675 (*)
     +--- org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitx64): 1.2.0-alpha01-dev675 (*)
     \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.0-alpha01-dev675

(*) - dependencies omitted (listed previously)

> Task :sample:counter:app-darwin-compose:linkDebugExecutableUikitX64 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sample:counter:app-darwin-compose:linkDebugExecutableUikitX64'.
> Process 'command '/Users/arkivanov/Downloads/zulu11.54.25-ca-jdk11.0.14.1-macosx_x64/zulu-11.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
</details>

arkivanov avatar May 01 '22 21:05 arkivanov

The workaround is to add kotlin.native.cacheKind=none to gradle.properties.

arkivanov avatar Jun 02 '22 13:06 arkivanov

Hello Ive this error with compose 1.2.2 , the workaround ( kotlin.native.cacheKind=none to gradle.properties) didnt not work

> Task :shared:compileKotlinIosX64 UP-TO-DATE

> Task :shared:linkDebugFrameworkIosX64 FAILED
e: Module "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64)" has a reference to symbol androidx.compose.runtime/remember|-2215966373931868872[0]. Neither the module itself nor its dependencies contain such declaration.

This could happen if the required dependency is missing in the project. Or if there is a dependency of "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64)" that has a different version in the project than the version that "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.2.2" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.

The list of "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.2.2" dependencies that may lead to conflicts:
1. "stdlib: 1.7.10" (was initially compiled with "stdlib: 1.6.20")
2. "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.0")
3. "org.jetbrains.kotlin.native.platform.darwin: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.darwin: 1.6.0")
4. "org.jetbrains.kotlin.native.platform.posix: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.posix: 1.6.20")
5. "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.2" (was initially compiled with "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.0")
6. "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.1" (was initially compiled with "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64)")

Project dependencies:
+--- org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitx64): 1.2.2
|    +--- org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitx64): 1.2.2
|    |    +--- org.jetbrains.compose.animation:animation-core (org.jetbrains.compose.animation:animation-core-uikitx64): 1.2.2
|    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2
|    |    |    |    +--- stdlib: 1.6.21 -> 1.7.10
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.7.10
|    |    |    |    |    +--- stdlib: 1.7.10
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.7.10
|    |    |    |    |    |    +--- stdlib: 1.7.10
|    |    |    |    |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.7.10
|    |    |    |    |    |         \--- stdlib: 1.7.10
|    |    |    |    |    \--- org.jetbrains.kotlin.native.platform.posix: 1.7.10 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.7.10 (*)
|    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.7.10 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.2
|    |    |    |    |    +--- stdlib: 1.6.20 -> 1.7.10
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.20 -> 1.7.10 (*)
|    |    |    |    |    \--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.2
|    |    |    |    |         +--- stdlib: 1.6.20 -> 1.7.10
|    |    |    |    |         \--- org.jetbrains.kotlin.native.platform.posix: 1.6.20 -> 1.7.10 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.2 (*)
|    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.1
|    |    |    |         +--- stdlib: 1.6.0 -> 1.7.10
|    |    |    |         +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.0 -> 1.7.10 (*)
|    |    |    |         +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.0 -> 1.7.10 (*)
|    |    |    |         +--- org.jetbrains.kotlin.native.platform.posix: 1.6.0 -> 1.7.10 (*)
|    |    |    |         +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.0 -> 0.17.2 (*)
|    |    |    |         \--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.2 (*)
|    |    |    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.2
|    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    |    |    +--- org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.2.2
|    |    |    |    |    ^^^ This module requires symbol androidx.compose.runtime/remember|-2215966373931868872[0].
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    |    |    |    +--- stdlib: 1.6.21 -> 1.7.10
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21 -> 1.7.10 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.darwin: 1.6.21 -> 1.7.10 (*)
|    |    |    |    |    +--- org.jetbrains.kotlin.native.platform.posix: 1.6.21 -> 1.7.10 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): unknown -> 0.17.2 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu-cinterop-interop: 0.17.2 (*)
|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): unknown -> 1.6.1 (*)
|    |    |    |    +--- org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitx64): 1.2.2
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    |    |    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    |    |    |    +--- org.jetbrains.compose.ui:ui-graphics (org.jetbrains.compose.ui:ui-graphics-uikitx64): 1.2.2
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.2.2
|    |    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    |    |    |    |    +--- org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitx64): 1.2.2 (*)
|    |    |    |    |    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    |    |    |    |    \--- org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.37
|    |    |    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib: 1.6.10
|    |    |    |    |         |    \--- org.jetbrains:annotations: 13.0
|    |    |    |    |         \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.5.2 -> 1.6.1 (*)
|    |    |    |    +--- org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitx64): 1.2.2
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    |    |    |    +--- org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitx64): 1.2.2 (*)
|    |    |    |    |    |    ^^^ This module requires symbol androidx.compose.runtime/remember|-2215966373931868872[0].
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-graphics (org.jetbrains.compose.ui:ui-graphics-uikitx64): 1.2.2 (*)
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.2.2 (*)
|    |    |    |    |    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    |    |    |    |    +--- org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.37 (*)
|    |    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.2 (*)
|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.1 (*)
|    |    |    |    +--- org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.2.2 (*)
|    |    |    |    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    |    |    |    +--- org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.37 (*)
|    |    |    |    +--- org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.2 (*)
|    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.1 (*)
|    |    |    +--- org.jetbrains.compose.ui:ui-unit (org.jetbrains.compose.ui:ui-unit-uikitx64): 1.2.2 (*)
|    |    |    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.1 (*)
|    |    +--- org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitx64): 1.2.2
|    |    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    |    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.2 (*)
|    |    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.2 (*)
|    |    +--- org.jetbrains.compose.ui:ui-geometry (org.jetbrains.compose.ui:ui-geometry-uikitx64): 1.2.2 (*)
|    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    +--- org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    \--- org.jetbrains.skiko:skiko (org.jetbrains.skiko:skiko-iosx64): 0.7.37 (*)
+--- org.jetbrains.compose.material:material (org.jetbrains.compose.material:material-uikitx64): 1.2.2
|    +--- org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.animation:animation-core (org.jetbrains.compose.animation:animation-core-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.foundation:foundation-layout (org.jetbrains.compose.foundation:foundation-layout-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.material:material-icons-core (org.jetbrains.compose.material:material-icons-core-uikitx64): 1.2.2
|    |    \--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.material:material-ripple (org.jetbrains.compose.material:material-ripple-uikitx64): 1.2.2
|    |    +--- org.jetbrains.compose.animation:animation (org.jetbrains.compose.animation:animation-uikitx64): 1.2.2 (*)
|    |    +--- org.jetbrains.compose.foundation:foundation (org.jetbrains.compose.foundation:foundation-uikitx64): 1.2.2 (*)
|    |    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    |    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
|    +--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.2 (*)
|    +--- org.jetbrains.compose.ui:ui-text (org.jetbrains.compose.ui:ui-text-uikitx64): 1.2.2 (*)
|    \--- org.jetbrains.compose.ui:ui-util (org.jetbrains.compose.ui:ui-util-uikitx64): 1.2.2
+--- org.jetbrains.compose.runtime:runtime (org.jetbrains.compose.runtime:runtime-uikitx64): 1.2.2 (*)
\--- org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitx64): 1.2.2 (*)

(*) - dependencies omitted (listed previously)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared:linkDebugFrameworkIosX64'.
> Compilation finished with errors

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
2 actionable tasks: 1 executed, 1 up-to-date
Command PhaseScriptExecution failed with a nonzero exit code


multiport avatar Jan 01 '23 08:01 multiport

@multiport Can you please share a reproducible example of your issue on GitHub?

dima-avdeev-jb avatar Jan 01 '23 17:01 dima-avdeev-jb

Have a reproducible example here https://github.com/xxfast/NYTimes-KMP/pull/1/commits/860ae44fdb1d8a200294a3db9aa751c9906ebd03

I've disable the cache on subsequent commit which seems to fix this, but would like if we can keep the cache around

xxfast avatar Mar 15 '23 05:03 xxfast

I'm getting the same issue but with a macOS target. My project is here: https://github.com/zacharee/SamloaderKotlin.

It seems like it comes up as soon as ComposeLayer is referenced.

zacharee avatar Apr 02 '23 00:04 zacharee

Ran into this as well and doing a gradle clean plus the no cache seemed to work for me

mrf7 avatar Apr 25 '23 18:04 mrf7

Currently facing the same issue while trying running the app on iOS with with the error:

Module "org.jetbrains.compose.ui:ui (org.jetbrains.compose.ui:ui-uikitsimarm64)" has a reference to symbol androidx.compose.runtime/CompositionLocalProvider|-195475592741065473[0]. Neither the module itself nor its dependencies contain such declaration. My environments versions are kotlin.version=1.8.20 agp.version=8.0.1 compose.version=1.4.0

It's working and run perfectly on Android, any help?

mustfaibra avatar Jul 05 '23 12:07 mustfaibra

@mustfaibra You can add kotlin.native.cacheKind=none to file gradle.properties. Also, you can set isStatic=true, like here: https://github.com/JetBrains/compose-multiplatform-template/blob/af22a50222f4bea8f5ea19c813549d86c97eb3a8/shared/build.gradle.kts#L25

dima-avdeev-jb avatar Jul 05 '23 12:07 dima-avdeev-jb

The core issue was fixed in Kotlin.

kotlin.native.cacheKind=none theoretically should no longer be required after its support in Compose. But to be sure, we still need to do final checks, change templates, and then we can close the issue.

igordmn avatar Jul 26 '23 10:07 igordmn