1

Material 3 dynamic colors @color/material_dynamic_* do not seem to exist on android versions that do not natively support dynamic color (i.e. < Android 12). This causes a crash with Resources$NotFoundException: Drawable com.example.real:color/material_dynamic_primary20 with resource ID #0x7f060204 when inflating any layout XML on Android < 12.

My application's theme inherits from Theme.Material3.DayNight.NoActionBar, and I'm using the latest Material support library.

Is there an alternative to using these color resources that work on older android versions that do not natively support Material dynamic colors?

CryptoAlgorithm
  • 838
  • 5
  • 15

0 Answers0