-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
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>
Woren, qdsfdhvh, Tlaster, LandryNorris, omainegra and 11 more
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
arkivanov commentedon Jun 2, 2022
The workaround is to add
kotlin.native.cacheKind=none
togradle.properties
.multiport commentedon Jan 1, 2023
Hello Ive this error with compose 1.2.2 , the workaround ( kotlin.native.cacheKind=none to gradle.properties) didnt not work
dima-avdeev-jb commentedon Jan 1, 2023
@multiport Can you please share a reproducible example of your issue on GitHub?
xxfast commentedon Mar 15, 2023
Have a reproducible example here xxfast/NYTimes-KMP@860ae44
I've disable the cache on subsequent commit which seems to fix this, but would like if we can keep the cache around
zacharee commentedon Apr 2, 2023
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.Workaround for JetBrains/compose-multiplatform#2046
mrf7 commentedon Apr 25, 2023
Ran into this as well and doing a
gradle clean
plus the no cache seemed to work for memustfaibra commentedon Jul 5, 2023
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?
dima-avdeev-jb commentedon Jul 5, 2023
@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
igordmn commentedon Jul 26, 2023
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.Set Kotlin/Native cache kind based on Kotlin version
Set Kotlin/Native cache kind based on Kotlin version
Set Kotlin/Native cache kind based on Kotlin version
Manage Kotlin native cache kind automatically based on Kotlin version (…
okushnikov commentedon Jul 14, 2024
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.