android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020013
某天,我的应用程序在5.0系统以上运行萌萌哒。
测试的时候换成了4.4的时候,一打开就崩,一打开就崩,崩到我怀疑人生。
android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020013
google了一下(终于用上了公司的VPN感觉萌萌哒从此妈妈再也不用担心我的学习了)
大神们建议:
// Gradle Plugin 2.0+
android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}
我试过了,无效。
于是,用了下面的方法,奇效!!(就是把版本调高)
将
compile ':appcompat-v7:23.4.0'
compile ':design:23.4.0'
compile ':recyclerview-v7:23.4.0'
compile ':cardview-v7:23.4.0'
更新为:
compile ':appcompat-v7:24.2.0'
compile ':design:24.2.0'
compile ':recyclerview-v7:24.2.0'
compile ':cardview-v7:24.2.0'
将
buildToolsVersion "22.0.1"
改为
buildToolsVersion "23.0.3"
All right.程序员的世界恢复了平静。