2

In my Android Project I was using the Compose BOM 2023.08.00 version, and now I updated to 2024.04.01, but after doing so, dynamic colors no longer work. Instead, it shows gray (which isn't the standard blue nor the Material purple).

Before the update (red-ish from the background):

Before the update

After the update:

After the update

Didn't change anything and happens with every other color. I'll add more info if needed.

3
  • by updating means what? and dynamic color as in from materialTheme right?
    – Gaurav Roy
    Commented Apr 27 at 2:35
  • @GauravRoy By updating I mean changing the BoM version in Gradle and sync. And yes, I am using the default [app name]Theme.
    – SoyFaii
    Commented Apr 27 at 18:20
  • I noticed that it only happens in my physical device (a Samsung phone) and the Compose previews, but not the emulator (a Pixel). I don't think Google decided to make dynamic colors exclusive to Pixel (although we can't discard that), and it's not Samsung's fault because it worked with the previous version of Compose. I also noticed that Google apps are gray in my physical device, but not in the emulator, as well as the Preview showing dynamic color if the API is Android 12, but not in other versions. This is really strange. Specially because nothing appears in the release notes.
    – SoyFaii
    Commented Apr 28 at 14:19

1 Answer 1

3

I am seeing this same issue, only on my Samsung device. It seems to have broken with Compose BoM 2024.02.00, when androidx.compose.material3:material3 was bumped from 1.1.2 to 1.2.0. I don't see anything in the change log either.

1
  • 1
    Yep. I was going to answer myself, but you did it first. According to this GitHub issue I found, this is Samsung's issue (as well as other OEMs with custom UIs, like Realme, that were also affected). I hope this is fixed with the upcoming One UI 6.1, as this appears to apply to every Compose app (even Google's), making dynamic color useless. Thank you for the answer!
    – SoyFaii
    Commented May 1 at 17:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.