I'm getting this error: ```Exception in thread "ma...
# compose-desktop
m
I'm getting this error:
Copy code
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'int org.jetbrains.skiko.SystemThemeHelper.getCurrentSystemTheme()'
Relevant code:
Copy code
@Composable
fun Wrapper(
    isDarkTheme: Boolean = isSystemInDarkTheme(),
    colorScheme: ColorScheme = if (isDarkTheme) darkColorScheme() else lightColorScheme(),
    wrapperColor: Color = colorScheme.surface,
    content: @Composable () -> Unit
) {
    MaterialTheme(
        colorScheme = colorScheme,
    ) {
        Surface(
            modifier = Modifier.fillMaxSize(),
            color = wrapperColor,
        ) {
            content()
        }
    }
}
a
Is it possible you’re somehow getting the wrong version of skiko? What libraries are you using?
m
Only Compose Multiplatform and
com.darkrockstudios:mpfilepicker:3.1.0
a
If you remove that dependency, what happens?
m
I still get the same error
Compose 1.5.12, Kotlin 1.9.22
a
Hmm, Compose 1.5 is quite old now. Try 1.6.11
m
a
Can you try just to see whether you get the error?
i
UnsatisfiedLinkError
usually means inconsistent dependency.
SystemThemeHelper
was added by https://github.com/JetBrains/skiko/pull/868 (v0.7.93), so it should be there for Compose 1.5.12 (skiko v0.7.85.4) 🤔 Some notes that can help to figure out the reason: • Version of Compose Multiplatform is set by gradle plugin, so re-check its version
UnsatisfiedLinkError
usually means inconsistent dependency or missing native binary
SystemThemeHelper
was added in v0.7.93, so it should be there for Compose 1.5.12 (skiko v0.7.85.4) 🤔 Some notes that can help to figure out the reason: 1. Version of Compose Multiplatform is set by gradle plugin, so re-check its version 2. Desktop requires dependency based on current OS. It's done by
desktopMain.dependencies { implementation(compose.desktop.currentOs) }
, so make sure that you have it in your build config 3. Analyze
./gradlew dependencies
output - it shows if some triggers upgrade/downgrade of included libraries