I'm using ?attr/colorControlNormal in a view for divider.
<View
android:id="@+id/divider2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/colorControlNormal"/>
When i run my app in android 10 it works fine. But if i run it on android 7 or below app crashes with error
android.content.res.Resources$NotFoundException: File res/color/secondary_text_material_light.xml from drawable resource ID #0x1060126
Also same thing goes when I use ?attr/colorSurface
or ?attr/colorOnSurface
.
I'm using these attributes because they will work for both Day and Night Theme. But I don't know why it is happening, any ideas...