Closed pelmenstar1 closed 1 year ago
I think I found the reason.
Here is how the theme is initialized: https://github.com/alorma/Compose-Settings/blob/84b08ed1455cf250e12735d2cab8db1c43588ec3/app/src/main/java/com/alorma/compose/settings/example/ui/theme/Theme.kt#L11-L33
The problem is it just checks whether dynamicThemePreference
is true. But it doesn't check the API level even though both dynamicDarkColorScheme
and dynamicLightColorScheme
require API level 31. By default, dynamicThemePreference is true regardless of the API level.
I launched the app on API level 28, so that's why the problem emerged. If dynamicThemePreference
is disabled manually, everything works fine.
I will create a fix soon.
The stack trace:
Looks like something is wrong with resources