Receiving ```java.lang.NoSuchMethodError: 'int androidx.compose.ui.unit.Constraints.getMaxWidth()' ...
l
Receiving
Copy code
java.lang.NoSuchMethodError: 'int androidx.compose.ui.unit.Constraints.getMaxWidth()'
	at androidx.compose.ui.window.DesktopPopup_desktopKt$PopupLayout$6$composition$1$1.measure-3p2s80s(DesktopPopup.desktop.kt:184)
when trying to Expand a simple DropdownMenu. Using version 1.1.1
Copy code
DropdownMenu(
            expanded = viewModel.expanded.value,
            onDismissRequest = { viewModel.expanded.value = false },
        ) {
            DropdownMenuItem(onClick = {  }) {
                Text("A")
            }
            DropdownMenuItem(onClick = { }) {
                Text("B")
            }      
            DropdownMenuItem(onClick = {  }) {
                Text("C")
            }
        }
Any clues?
i
Some of the libraries uses the latest Compose, which has this bug. Try to find one, calling
./gradlew dependencyInsight --dependency org.jetbrains.compose.ui:ui
, and downgrade the version of it
l
Execution failed for task ':dependencyInsight'.
> Dependency insight report cannot be generated because the input configuration was not specified.
It can be specified from the command line, e.g: ':dependencyInsight --configuration someConf --dependency someDep'
Not sure about what configuration to use
i
what is your version of Gradle? and is it multiplatform (common+android+desktop) project or desktop-only? On Gradle 7.3.3, desktop-only project it works fine
Also try this one:
Copy code
./gradlew dependencyInsight --configuration compileClasspath --dependency org.jetbrains.compose.ui:ui
l
Gradle 7.3.3 I was using dev 692 with multiplatform (common+android+desktop+js) tried downgrading to 1.1.1 and removing js, but it continued I actually have a commom module with (common+android+desktop+js) sources (for shared stuff) another module with jvm only (for building a desktop app) and another module with again multiplatform (common+android+desktop+js) (for building a desktop, android, and web app)
Its probably some wrong configuration by me
Yeah i tried downgrading again to 1.1.1 and it worked Thanks
👍 1
👍🏻 1