android.content.res.Resources$NotFoundException: String resource ID #0x1
来源:互联网 发布:木材建筑知乎 编辑:程序博客网 时间:2024/05/21 22:50
今天写程序突然遇到这个问题,遂上网查询。
我的代码:holder.item_id.setText(schemeList.get(position).getId());
holder.item_text.setText(schemeList.get(position).getName());
这里的getId()得到的是一个int值,所以会被以为传入的是一个id,进而在R文件中查找,所以会报错。
把传入的int值加""改为String就ok了。
holder.item_id.setText(schemeList.get(position).getId()+"");
holder.item_text.setText(schemeList.get(position).getName()+"");
0 0
- 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
- Cocos2d中update与fixedUpdate的区别(三)
- key&IDEA
- 十个免费的 Web 压力测试工具
- 对RESTful Web API的理解与设计思路
- 小知识点2
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- 公司分析
- 站内信设计(群发)实现
- 多线程 同步 临界区
- hdu2148 Score
- view变化监听器ViewTreeObserver介绍
- Amoeba搞定mysql主从读写分离
- Java程序最容易犯的21种错误实例分析
- centos5.4简单配置LVS-DR