【解决】android.content.res.Resources$NotFoundException:String resource ID #0x86
来源:互联网 发布:开淘宝需要交钱吗 编辑:程序博客网 时间:2024/05/17 23:53
运行中遇到这个异常,刚开始不知所措,因为异常出现在Toast的地方,原因最后发现是:
在Toast中的第二个参数是java.lang.CharSequence类型,而我在里面放进去的是int类型,忽略掉了,就出错了。
CharSequence是一个接口,不可以用new来实例化。
String 继承于CharSequence,也就是说String也是CharSequence类型。
CharSequence是一个接口,它只包括length(), charAt(int index), subSequence(int start, int end)这几个API接口。除了String实现了CharSequence之外,StringBuffer和StringBuilder也实现了CharSequence接口。
需要说明的是,CharSequence就是字符序列,String, StringBuilder和StringBuffer本质上都是通过字符数组实现的!
StringBuilder 和 StringBuffer 的区别
StringBuilder 和 StringBuffer都是可变的字符序列。它们都继承于AbstractStringBuilder,实现了CharSequence接口。
但是,StringBuilder是非线程安全的,而StringBuffer是线程安全的。
部分摘自:http://www.fengfly.com/plus/view-214077-1.html
0 0
- android.content.res.Resources$NotFoundException:String resource ID #0x86
- android.content.res.Resources$NotFoundException:String resource ID #0x86
- android.content.res.Resources$NotFoundException:String resource ID #0x86
- android.content.res.Resources$NotFoundException:String resource ID #0x86
- 【解决】android.content.res.Resources$NotFoundException:String resource ID #0x86
- 【已解决】android.content.res.Resources$NotFoundException: String resource ID
- 错误类型:android.content.res.Resources$NotFoundException:String resource ID #0x86
- 异常:android.content.res.Resources$NotFoundException:String resource ID #0x86的问题
- android.content.res.Resources$NotFoundException: String resource ID #0x6d
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- android.content.res.Resources$NotFoundException: String resource ID #0x0
- android.content.res.Resources$NotFoundException: String resource ID #0x0
- android.content.res.Resources$NotFoundException: String resource ID #0x7f050016
- android.content.res.Resources$NotFoundException:String resource ID #0x446
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- android.content.res.Resources$NotFoundException: String resource ID #0x42
- 刚才 item 的点击监听被屏蔽了
- MVC之Area相关技术
- JS笔记
- A Theoretical Analysis of Feature Pooling in Visual Recognition
- 杨氏矩阵
- 【解决】android.content.res.Resources$NotFoundException:String resource ID #0x86
- 服务器端负载均衡技术的本质原理
- 九度OJ 1497:面积最大的全1子矩阵(DP)
- JSP页面跳转页面带参数
- Shp文件的几何向量在Osg中转换及轮廓提取
- 实现标签对 tooltip 的快速调用
- Spring事务管理+openJPA List<实体>方法更新所有对象
- linux下memcached的启动/结束的方式
- oracle select into