Skip to content

Not working for CMP - web (wasmJs) #18

Description

@kavi707

Hi,

I'm trying to the use latest version (v1.1.1 with web-support) in my CMP - web application. I bundling my web app with wasmJs. Following is what I did
In my build.gradle.kts I added the dependency

sourceSets {
        commonMain {
            dependencies {
                 // All other dependencies
                 
                 implementation("network.chaintech:kmp-date-time-picker:1.1.1")
            }
         }
}

Then in my composable code, I kept following code

WheelDatePickerView(
            startDate = LocalDate.now(),
            rowCount = 3,
            yearsRange = IntRange(2026, 2027),
            shape = RoundedCornerShape(12.dp),
            containerColor = Color.White,
            dateTimePickerView = DateTimePickerView.DIALOG_VIEW,
            height = 300.dp
        ) {

        }

But when I sync my project I'm getting following error

KMP Dependencies Resolution Failure
Source set 'commonMain' couldn't resolve dependencies for all target platforms
Couldn't resolve dependency 'network.chaintech:kmp-date-time-picker' in 'commonMain' for all target platforms.
The dependency should target platforms: [js, wasmJs]
Unresolved platforms: [js]

Am I missing something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions