Android: getting Resources$NotFoundException for abc_ic_ab_back_material

后端 未结 7 2107
终归单人心
终归单人心 2020-12-19 02:31

I\'m getting a Resources$notfoundexception on older (pre-L) devices. I\'m including the full stacktrace below.

My version of the support library is the latest (24.1

7条回答
  •  萌比男神i
    2020-12-19 03:23

    The answer to this turned out to be buried at the bottom of this guide:

    https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88#.xucjbsts0

    It turns out that all you need to add this line in at the beginning of the activity that will use the resource:

    static {
            AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
        }
    

提交回复
热议问题