Sunil Kumar
05/09/2023, 6:26 AMFAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':shared:wasmPackageJson'.
> Could not resolve all dependencies for configuration ':shared:wasmNpm'.
> Could not resolve org.jetbrains.compose.runtime:runtime:1.4.0.
Required by:
project :shared
> No matching variant of org.jetbrains.compose.runtime:runtime:1.4.0 was found. The consumer was configured to find a library for use during 'kotlin-runtime', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm' but:
- Variant 'debugApiElements-published' capability org.jetbrains.compose.runtime:runtime:1.4.0 declares a library:
- Incompatible because this component declares a component for use during compile-time, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
- Other compatible attribute:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Variant 'debugRuntimeElements-published' capability org.jetbrains.compose.runtime:runtime:1.4.0 declares a library for use during runtime:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
- Other compatible attribute:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Variant 'desktopApiElements-published' capability org.jetbrains.compose.runtime:runtime:1.4.0 declares a library:
- Incompatible because this component declares a component for use during compile-time, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
- Other compatible attribute:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
And many more similar logs are there
Help me please, I want to build an app for all android , ios, desktop and web in single project by sharing compose ui. ThanksSunil Kumar
05/09/2023, 6:34 AMDefault configuration for Compose for Web is disabled: multiple Kotlin JS IR targets are defined. Specify Compose for Web Kotlin targets by using `compose.web.targets()`
Adam S
05/09/2023, 6:56 AMCould not resolve org.jetbrains.compose.runtimeruntime1.4.0
No matching variantI don’t think v1.4.0 has a WASM variant
Sunil Kumar
05/09/2023, 6:59 AMOleksandr Karpovich [JB]
05/09/2023, 10:25 AMThen which version of compose runtime has wasm variant?
1.4.0-dev-wasm06 or whatever version is used in ImageViewer example with k/wasm
Sunil Kumar
05/09/2023, 4:43 PM> Task :shared:linkPodDebugFrameworkIosSimulatorArm64 FAILED
warning: Cannot infer a bundle ID from packages of source files and exported dependencies, use the bundle name instead: shared. Please specify the bundle ID explicitly using the -Xbinary=bundleId=<id> compiler flag.
error: Compilation failed: No file for /App|3770576908038690392[0]
* Source files:
* Compiler version info: Konan: 1.8.20 / Kotlin: 1.8.20
* Output kind: FRAMEWORK
error: java.lang.IllegalStateException: No file for /App|3770576908038690392[0]
at org.jetbrains.kotlin.backend.konan.serialization.KonanIrLinker$KonanPartialModuleDeserializer.getFileNameOf(KonanIrlinker.kt:500)
at org.jetbrains.kotlin.backend.konan.serialization.KonanIrLinker.getExternalDeclarationFileName(KonanIrlinker.kt:435)
at org.jetbrains.kotlin.backend.konan.DependenciesTrackerImpl$add$2.invoke(DependenciesTracker.kt:106)
at org.jetbrains.kotlin.backend.konan.DependenciesTrackerImpl$add$2.invoke(DependenciesTracker.kt:105)
i am stuck with that, please helpOleksandr Karpovich [JB]
05/09/2023, 4:47 PMSunil Kumar
05/09/2023, 4:52 PMSunil Kumar
05/09/2023, 7:10 PMval copyJsResources = tasks.create("copyJsResourcesWorkaround", Copy::class.java) {
from(project(":shared").file("src/commonMain/resources"))
into("build/processedResources/js/main")
}
And i checked resource is being copied as well, But its not loading in web ui, i am using it like this in common code
Image(
painterResource("compose-multiplatform.xml"),
null
)
Can you give me any suggestion for that., why its not loading image. ThanksOleksandr Karpovich [JB]
05/10/2023, 9:26 AMSunil Kumar
05/10/2023, 11:11 AMSunil Kumar
05/10/2023, 11:20 AMOleksandr Karpovich [JB]
05/10/2023, 11:23 AMSunil Kumar
05/11/2023, 4:23 AMSunil Kumar
05/11/2023, 4:23 AM