martmists
09/09/2024, 7:32 PMException in thread "main" java.lang.UnsatisfiedLinkError: 'int org.jetbrains.skiko.SystemThemeHelper.getCurrentSystemTheme()'
Relevant 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()
}
}
}
Alexander Maryanovsky
09/09/2024, 7:53 PMmartmists
09/09/2024, 7:57 PMcom.darkrockstudios:mpfilepicker:3.1.0
Alexander Maryanovsky
09/09/2024, 7:59 PMmartmists
09/09/2024, 8:10 PMmartmists
09/09/2024, 8:11 PMAlexander Maryanovsky
09/09/2024, 8:26 PMmartmists
09/09/2024, 8:45 PMAlexander Maryanovsky
09/09/2024, 8:52 PMIvan Matkov
09/10/2024, 7:53 AMUnsatisfiedLinkError
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 versionIvan Matkov
09/10/2024, 7:56 AMUnsatisfiedLinkError
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