Android: getting Resources$NotFoundException for abc_ic_ab_back_material

后端 未结 7 2010
终归单人心
终归单人心 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条回答
  • 2020-12-19 03:25

    I was using the application context when calling ContextCompat.getDrawable() which also crashes the app with Resources$NotFoundException and now the following message even though everything else was set up just fine:

    If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info.

    All I had to do was to change to the view's Context. :)

    0 讨论(0)
提交回复
热议问题