Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.jetbrains.skiko.SystemThemeHelper.getCurrentSystemTheme() crash #4627

Open
JagadishaIncture opened this issue Apr 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working wait for reply Further information is requested

Comments

@JagadishaIncture
Copy link

Iam facing some issue with Desktop version while running

@Composable fun AppTheme( useDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit ) { MaterialTheme( colorScheme = if (useDarkTheme) { darkColorScheme() } else { lightColorScheme() }, content = content ) }

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 'int org.jetbrains.skiko.SystemThemeHelper.getCurrentSystemTheme()'
at org.jetbrains.skiko.SystemThemeHelper.getCurrentSystemTheme(Native Method)
at org.jetbrains.skiko.SystemTheme_awtKt.getCurrentSystemTheme(SystemTheme.awt.kt:4)
at androidx.compose.ui.SystemThemeKt$LocalSystemTheme$1.invoke(SystemTheme.kt:30)
at androidx.compose.ui.SystemThemeKt$LocalSystemTheme$1.invoke(SystemTheme.kt:29)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at androidx.compose.runtime.LazyValueHolder.getCurrent(ValueHolders.kt:29)
at androidx.compose.runtime.LazyValueHolder.getValue(ValueHolders.kt:31)
at androidx.compose.runtime.CompositionLocalMapKt.read(CompositionLocalMap.kt:90)
at androidx.compose.runtime.ComposerImpl.consume(Composer.kt:2136)
at androidx.compose.foundation.DarkTheme_skikoKt._isSystemInDarkTheme(DarkTheme.skiko.kt:53)
at androidx.compose.foundation.DarkThemeKt.isSystemInDarkTheme(DarkTheme.kt:41)

Screenshot 2024-04-16 at 5 11 03 PM
@JagadishaIncture JagadishaIncture added bug Something isn't working submitted labels Apr 16, 2024
@terrakok
Copy link
Collaborator

Could you provide a little more information? A reproduser, your system and jvm info, gradle/kotlin/compose versions etc

@terrakok terrakok self-assigned this Apr 17, 2024
@terrakok terrakok changed the title Issue while running Desktop version org.jetbrains.skiko.SystemThemeHelper.getCurrentSystemTheme() crash Apr 17, 2024
@igordmn igordmn added the wait for reply Further information is requested label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wait for reply Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants