I tried using <1.6.0-dev1405> in my project and it...
# compose-desktop
z
I tried using 1.6.0-dev1405 in my project and it seems like for some reason the compose compiler isn't running at all. I'm curious as to whether this is an issue specifically with my project, or if others are able to reproduce this.
Exception in thread "main" java.lang.NoSuchMethodError: 'androidx.compose.material3.ButtonColors androidx.compose.material3.ButtonDefaults.textButtonColors(androidx.compose.runtime.Composer, int)'
Exception in thread "main" java.lang.NoSuchMethodError: 'void androidx.compose.material3.SkikoMenu_skikoKt.DropdownMenu-4kj-_NE(boolean, kotlin.jvm.functions.Function0, androidx.compose.ui.Modifier, long, androidx.compose.foundation.ScrollState, androidx.compose.ui.window.PopupProperties, kotlin.jvm.functions.Function3, androidx.compose.runtime.Composer, int, int)'
i
This function was added during merging last material3. "NoSuchMethodError" - is usually about binary incompatibility, but in this case it's most likely because material3 was resolved in some older version without this function. Anyway I'd start investigation with looking at resolved gradle versions. We'll re-check it on our side as well just in case
i
Can you try to add this in your
build.gradle
and tell if it helps?
Copy code
configurations.all {
    resolutionStrategy.eachDependency {
        if (
            requested.group.startsWith("org.jetbrains.compose.runtime") ||
            requested.group.startsWith("org.jetbrains.compose.ui") ||
            requested.group.startsWith("org.jetbrains.compose.foundation") ||
            requested.group.startsWith("org.jetbrains.compose.material") ||
            requested.group.startsWith("org.jetbrains.compose.material3")
        ) {
            useVersion("1.6.0-dev1405")
        }
    }
}
g
I had a sorta similar issue when I went from the last dev build to this one, and I was already using Igor's block above - for me it was gradle seemed to refresh things in a weird order and gave up. I had to remove the resolution block, let it sync w/ the new version, and then re-add the dependency block and let it sync again or gradle wouldn't build. After that everything's worked as expected.
e
I have a similar issue (
java.lang.NoSuchMethodError: 'androidx.compose.material3.ColorScheme androidx.compose.material3.ColorSchemeKt.darkColorScheme-C-Xl9yA$default(long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, int, int, java.lang.Object)
) which only happens if I run from Android Studio but not if I run gradle from the command line. Adding Igor's block and then syncing and then running from the IDE works. I can then remove the block, sync and running from the IDE still works.