android.content.res.Resources$NotFoundException: String resource ID #0x1
来源:互联网 发布:图书借阅软件 编辑:程序博客网 时间:2024/04/25 07:20
今天在使用toast的makeText方法时报出 android.content.res.Resources$NotFoundException: String resource ID #0x1这个错误。看一下makeText重载的两个方法:
makeText (Context context,CharSequence text, int duration);
makeText (Context context, int resId, int duration);
我的本意是显示一个整形数字,没想到他第二个参数整形表示资源文件中的id值,所以会报错,把要显示的整数转换成String问题就解决了。
看了重载的方法要仔细使用啊。
- 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 #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 #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 #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 #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 #0x1
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- Windows多显示器编程--VC
- strrchr()——查找字符串中最后出现某个字符的地方
- ISO
- Android中打包含有Activity以及资源文件的jar包在工程中调用
- cocos2d-x学习笔记(三)让精灵按照自己设定的运动轨迹行动(曲线移动)。(以椭圆轨迹为例)。
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- C语言中实现数据与算法分离
- 数据库之【异常处理篇】
- nginx下配置zendframe一种简单方法
- twisted实现udp广播聊天
- 手把手教你把Vim改装成一个IDE编程环境
- s2si配置2
- 乱码过虑器(对于get和post提交方法都有用)
- Yipit的“一夜成名”及其背后的坚持