With the first patch for AS Arctic Fox Jetpack Compose previews stopped working.
I'm getting this error for all previews - even older ones, which worked fine a while back:
android.content.res.Resources$NotFoundException: Could not resolve resource value: [some hex value]
Are here any quick fixes for this? Clearing caches and the usual stuff did not work.
EDIT:
Looks like the problem is not always present. Some preview started working, while other are still failing.
EDIT 2:
This is happening in dynamic feature modules, when there's a need for resources from the main module or painterResource()
is being used (even is resource from the same module is to be displayed).
This got fixed in AS Bumblebee, patch 2.
Edit (copied from comments): It then got broken again in Electric Eel | 2022.1.1
and fixed again in Flamingo | 2022.2.1 Beta 4
.
Edit 2 (copied from comments - Feb 2024): It apparently got broken again in Giraffe and Hedgehog.