This project reproduces AOSP Issue 111869542.
There are three drawables relevant to the issue:
gradient_broken.xml
: uses both theme attributes and direct color references, causing the crash.gradient_working1.xml
: uses only direct color references, and works fine.gradient_working2.xml
: uses only theme attributes, and works fine.
Correspondingly, there are three activities which load each of the backgrounds:
BrokenActivity.kt
(In launcher asGD: Broken
): loads a layout containinggradient_broken
as a background, and crashes.WorkingActivity1.kt
(In launcher asGD: Working1
): loads a layout containinggradient_working1
as a background, and works fine.WorkingActivity2.kt
(In launcher asGD: Working2
): loads a layout containinggradient_working2
as a background, and works fine.