华为手机碰到的问题记录-NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID
2016-10-20 22:57
836 查看
在项目测试阶段,发现好多华为手机打开app立即奔溃,使用umeng的统计无法发现问题,还好自己写的UncaughtExceptionHandler类中有记录错误信息
android.content.res.Resources$NotFoundException:
File res/drawable/abc_vector_test.xml from drawable resource ID
at android.content.res.Resources.loadDrawable(Resources.java:2154)
at com.huawei.android.content.res.ResourcesEx.loadDrawable(ResourcesEx.java:653)
at android.content.res.Resources.getDrawable(Resources.java:741)
后来通过stackoverflow查找一种解决方法
地址:http://stackoverflow.com/questions/35739743/file-res-drawable-abc-ic-ab-back-material-xml-from-drawable-resource-id-0x7f020
在build.gradle中添加
在真机上没有效果,还是崩溃(可能是我没完全理解回答的内容,如有网友解决,请在留言区告知下,谢谢~~)
后来在http://ask.csdn.net/questions/244746 中看到关于support库的版本问题,然后就记起来前段时间有更新support版本,当我support版本从24改到23后,发现问题就解决了。
以下是我修改的库版本:
android.content.res.Resources$NotFoundException:
File res/drawable/abc_vector_test.xml from drawable resource ID
at android.content.res.Resources.loadDrawable(Resources.java:2154)
at com.huawei.android.content.res.ResourcesEx.loadDrawable(ResourcesEx.java:653)
at android.content.res.Resources.getDrawable(Resources.java:741)
后来通过stackoverflow查找一种解决方法
地址:http://stackoverflow.com/questions/35739743/file-res-drawable-abc-ic-ab-back-material-xml-from-drawable-resource-id-0x7f020
在build.gradle中添加
android { defaultConfig { vectorDrawables.useSupportLibrary = true } }
在真机上没有效果,还是崩溃(可能是我没完全理解回答的内容,如有网友解决,请在留言区告知下,谢谢~~)
后来在http://ask.csdn.net/questions/244746 中看到关于support库的版本问题,然后就记起来前段时间有更新support版本,当我support版本从24改到23后,发现问题就解决了。
以下是我修改的库版本:
compile 'com.android.support:support-v4:23.3.0' compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:design:23.3.0'
相关文章推荐
- NotFoundException: File res/drawable/abc_vector_test.xml from drawable resourceID
- Android开发 Resources$NotFoundException: File res/drawable/abc_vector_test.xml from xml
- File res/drawable/abc_vector_test.xml from drawable resource ID
- NotFoundException: File res/drawable/abc_ic_ab_back_material.xml from drawable resource
- android.content.res.Resources$NotFoundException: File res/drawable/*.xml from drawable resource ID
- File res/drawable/abc_vector_test.xml from drawable resource ID
- Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml fr
- Exception android.content.res.Resources$NotFoundException: File res/drawable/my.xml from drawable re
- Android问题解决记录—android.content.res.Resources$NotFoundException: Unable to find resource ID
- java.io.FileNotFoundException: class path resource [bean/test/User.hbm.xml] cannot be opened because it does not exist
- 【BUG】android.content.res.Resources$NotFoundException: File res/drawable-xxhdpi/toolbar_line.png from
- tomcat错误:java.io.FileNotFoundException: Could not resolve XML resource [null] with public ID [null]
- 异常:android.content.res.Resources$NotFoundException:String resource ID #0x86的问题
- 异常记录之android.content.res.Resources$NotFoundException: String resource ID
- 关于android.content.res.Resources$NotFoundException: Resource is not a Drawable 问题的解决办法
- [糊里糊涂解决] android.content.res.Resources$NotFoundException: File res/drawable/selector_edit.xml fro
- android.content.res.Resources$NotFoundException:Resource ID #0x7f080004 type #0x12 is not valid问题解决
- java.io.FileNotFoundException: Could not resolve XML resource [null] with public ID [null], system I
- Android 常见问题之 android.content.res.Resources$NotFoundException: Resource ID 解决方案
- ssh整合是Caused by: java.io.FileNotFoundException: class path resource [bean/test/User.hbm.xml] cannot