android.content.res.Resources$NotFoundException解决办法

来源:互联网 发布:知乎阿里dva框架react 编辑:程序博客网 时间:2024/06/04 19:08
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 'com.android.support:appcompat-v7:23.4.0'compile 'com.android.support:design:23.4.0'compile 'com.android.support:recyclerview-v7:23.4.0'compile 'com.android.support:cardview-v7:23.4.0'
更新为:
compile 'com.android.support:appcompat-v7:24.2.0'compile 'com.android.support:design:24.2.0'compile 'com.android.support:recyclerview-v7:24.2.0'compile 'com.android.support:cardview-v7:24.2.0'
buildToolsVersion "22.0.1"
改为
buildToolsVersion "23.0.3"
All right.程序员的世界恢复了平静。
0 0
原创粉丝点击