Using Constraint Layout in Jetpack Compose Desktop

495 Views Asked by At

I have a new Jetpack Compose desktop project in Intellij setup using the new project wizard. I would like to use ConstraintLayout like in Android, so I add the following line

implementation("androidx.constraintlayout:constraintlayout:2.1.4")

in the build.gradle, like so:

sourceSets {
    val jvmMain by getting {
        dependencies {
            implementation(compose.desktop.currentOs)
            implementation("androidx.constraintlayout:constraintlayout:2.1.4")
        }
    }
    val jvmTest by getting
}

However I still can't access constraint layout.

Based off the answer in this question, it seems like it is possible to use constraint layout in desktop. What am I doing wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

ConstraintLayout is currently (Feb 2023) not implemented for Jetpack Compose Desktop