简体   繁体   English

api19上的android.content.res.Resources $ NotFoundException

[英]android.content.res.Resources$NotFoundException on api19

I got this exception 我有这个例外

Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020016

i try to get this icon in 我尝试将这个图标放入

ContextCompat.getDrawable(this, android.support.v7.appcompat.R.drawable.abc_ic_ab_back_material);
// ofc i used full path to support-v7 library icon, but i hadnt access to my code right now :(

Gradle version 2.1 Android support libraries version 24.2.0 Exception appears on api19 (4.4.4) Gradle 2.1版Android支持库24.2.0版api19(4.4.4)出现异常

adding to defaultConfig this line didnt solve issue 添加到defaultConfig这行没有解决问题

vectorDrawables.useSupportLibrary = true

Copying icon to my drawable directory didnt solve issue too 将图标复制到我的可绘制目录也无法解决问题

Maybe who know some tricks to avoid this exception? 也许谁知道一些避免这种异常的技巧?

Copying the drawable to project res folder solved issue. 将drawable复制到project res文件夹已解决问题。 Thanks for Shaishav 感谢Shaishav

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM