我遇到的android.content.res.Resources$NotFoundException的解决方案
来源:互联网 发布:网络导购员 编辑:程序博客网 时间:2024/06/06 23:50
07-29 16:19:18.101 29570-29570/? E/AndroidRuntime: FATAL EXCEPTION: main Process: violetjack.therapists_scancode, PID: 29570 android.content.res.Resources$NotFoundException: String resource ID #0x2d at android.content.res.Resources.getText(Resources.java:244) at android.widget.TextView.setText(TextView.java:3888) at manlong.therapists_scancode.view.PriceAdapter.getView(PriceAdapter.java:58)
错误原因是:由于我的数据获取到的是int类型的,而我却用setText方法传给了TextView,将类型转换为String就好了。
错误代码:
tv02.setText(obj.YZMC);
正确代码:
tv02.setText("" + obj.YZMC);
记录分享一下,希望能对同样遇到这个问题的朋友们一些帮助~
1 0
- 我遇到的android.content.res.Resources$NotFoundException的解决方案
- android.content.res.Resources$NotFoundException 的解决方法
- android.content.res.Resources$NotFoundException解决方案
- 【android.content.res.Resources$NotFoundException】解决方案
- 解决android.content.res.Resources NotFoundException的一个方法
- 解决android.content.res.Resources NotFoundException的一个方法
- android.content.res.Resources$NotFoundException错误的解决办法
- Android5.0上WebView的android.content.res.Resources$NotFoundException
- 一个ButterKnife引起的bug-android.content.res.Resources$NotFoundException
- android.content.res.Resources$NotFoundException
- android.content.res.Resources NotFoundException
- android.content.res.Resources$NotFoundException
- android.content.res.Resources$NotFoundException
- android.content.res.Resources$NotFoundException:
- android.content.res.Resources$NotFoundException:
- android.content.res.Resources$NotFoundException
- android.content.res.Resources$NotFoundException
- android.content.res.Resources$NotFoundException
- 时间联动 动态根据参照时间进行累加
- db2 存储过程动态游标及函数返回值总结
- KMP 模板
- 【文件的读写操作】
- Redis | redis-cli INFO / avg_ttl value
- 我遇到的android.content.res.Resources$NotFoundException的解决方案
- POJ 3084 - Panic Room【网络流 最小割】
- Android 自定义 view 详解
- Swift字符转Ascii
- HDU 5763(Another Meaning kmp+dp)
- HDU 5770 Treasure
- HDU 5456 Matches Puzzle Game(2015 ACM/ICPC Asia Regional Shenyang Online)
- Android 双击以及连续多次点击事件系统自带判断方法
- OC 分类