material-components / material-components/material-components-android

Version 1.11.0 Android studio layout preview broken

Open
#3,927 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

Description: Version 1.11.0 of Material 3 library breaks Android studio layout preview with apps which using the theme:
"Theme.Material3.DynamicColors.DayNight"
Which worked fine with previous versions.

Expected behavior:
Bug
"Theme.Material3.DayNight" still works but i prefer "Theme.Material3.DynamicColors.DayNight" as it gives more contrast color scheme

Render Problem:
Getting Render Problem errors while using "Theme.Material3.DynamicColors.DayNight" such as:
java.lang.NumberFormatException: Color value '@android:color/system_primary_dark' has wrong size. Format is either#AARRGGBB, #RRGGBB, #RGB, or #ARGB

java.lang.NumberFormatException: Color value '@android:color/system_primary_light' has wrong size. Format is either#AARRGGBB, #RRGGBB, #RGB, or #ARGB

Android API version: Android API version here
34
Material Library version: Material Android Library version you are using here (e.g., 1.1.0-alpha07)
Version 1.11.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Android Studio with Android API 34, Material library version 1.11.0, and the Theme.Material3.DynamicColors.DayNight theme. Compare the preview with Theme.Material3.DayNight and verify that the reported system_primary_dark and system_primary_light render errors are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.