Compose-Multiplatform-Wizard icon indicating copy to clipboard operation
Compose-Multiplatform-Wizard copied to clipboard

Trouble with room-runtime 2.7.2

Open PeTcHeNkA opened this issue 4 months ago • 3 comments

:composeApp:commonMain: Couldn't resolve dependency 'androidx.room:room-runtime' in 'commonMain' for all target platforms.
The dependency should target platforms: [android, android, iosArm64, iosSimulatorArm64, iosX64, js, jvm, wasmJs]
Unresolved platforms: [js, wasmJs]

Make sure you are using a dependency that targets all required platforms or move your dependency and relevant code to a more applicable source set: https://kotl.in/57b2-source-set-dependencies

Run the build with '--info' for more details.

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html


:composeApp:commonTest: Couldn't resolve dependency 'androidx.room:room-runtime' in 'commonTest' for all target platforms.
The dependency should target platforms: [android, android, android, iosArm64, iosSimulatorArm64, iosX64, js, jvm, wasmJs]
Unresolved platforms: [js, wasmJs]

Make sure you are using a dependency that targets all required platforms or move your dependency and relevant code to a more applicable source set: https://kotl.in/57b2-source-set-dependencies

Run the build with '--info' for more details.

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

:composeApp:jsMain: Could not resolve androidx.room:room-runtime:2.7.2.
Required by:
    project ':composeApp'

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

:composeApp:jsTest: Could not resolve androidx.room:room-runtime:2.7.2.
Required by:
    project ':composeApp'

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

:composeApp:wasmJsMain: Could not resolve androidx.room:room-runtime:2.7.2.
Required by:
    project ':composeApp'

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

:composeApp:wasmJsTest: Could not resolve androidx.room:room-runtime:2.7.2.
Required by:
    project ':composeApp'

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

:composeApp:webMain: Couldn't resolve dependency 'androidx.room:room-runtime' in 'webMain' for all target platforms.
The dependency should target platforms: [js, wasmJs]
Unresolved platforms: [js, wasmJs]

Make sure you are using a dependency that targets all required platforms or move your dependency and relevant code to a more applicable source set: https://kotl.in/57b2-source-set-dependencies

Run the build with '--info' for more details.

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

:composeApp:webTest: Couldn't resolve dependency 'androidx.room:room-runtime' in 'webTest' for all target platforms.
The dependency should target platforms: [js, wasmJs]
Unresolved platforms: [js, wasmJs]

Make sure you are using a dependency that targets all required platforms or move your dependency and relevant code to a more applicable source set: https://kotl.in/57b2-source-set-dependencies

Run the build with '--info' for more details.

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

PeTcHeNkA avatar Aug 24 '25 15:08 PeTcHeNkA

yeah, room doesn't support wasm 🤷 . just delete the target from your build config.

terrakok avatar Aug 24 '25 18:08 terrakok

yeah, room doesn't support wasm 🤷 . just delete the target from your build config.

OK, so should it be excluded from the generated dependency for the web platform, or is it pending support implementation?

PeTcHeNkA avatar Aug 27 '25 14:08 PeTcHeNkA

If you have a wasm target, then you cannot use the Room at the moment

terrakok avatar Aug 27 '25 14:08 terrakok