Android TextVeiw setText函数
来源:互联网 发布:三级分销数据统计表 编辑:程序博客网 时间:2024/06/06 02:40
问题
今天遇到一个问题,我setText从bean获取的数据,一运行就报错
android.content.res.Resources$NotFoundException: String resource ID #0x585c8
看crash日志,以为是findViewById的时候写错了,导致获取的TextView为空,反反复复查了几遍都没有写错
原因
第一次遇到这种问题,clean项目也不行,后来仔细分析了下是不是传入的值有问题,发现这个bean获取的数据是个int,而setText的参数是不能为int型的,不知道为什么没有提示报错
解决办法
很简单,换成字符串就好了
0 0
- Android TextVeiw setText函数
- android 代码TextVeiw 尾部添加图片
- Android setText异常
- android textview settext 问题
- android.widget.TextView.setText()
- Android setText()异常
- android TextView.setText
- android EditText setText发生stackoerverflowerror
- android-textview-settext()输出数字
- android settext刷新其他控件
- Android-Uiautomator:setText输入速度
- 解决android studio使用setText函数,在设备中显示乱码问题
- ActiveRichTextField类中setText函数的使用方法
- android 控件 setText 按格式输入 %d
- android textview settext卡顿深层次原因
- setText() 引起 android.content.res.Resources$NotFoundException
- Android settext \n未转义解决方法
- Android studio 解决setText中文乱码问题
- 分布式系统调用链监控
- 给图像添加边界
- 自己的首个小系统
- 【LeetCode】 235. Lowest Common Ancestor of a Binary Search Tree
- poj3276 Face The Right Way 反转问题
- Android TextVeiw setText函数
- Linux同步时间服务器
- NumberUtils简单介绍和具体实例
- 【语言-批处理】批处理windows锁屏
- win10mysql(5.7.16)数据库删除和重新安装
- Oracle数据库的冷备恢复到另一台机器上.
- (转)SQLServer基础 单行注释与多行注释
- 谈谈码率,帧率,分辨率和清晰度的关系
- ①极好的PCA帖子&白化;②数据降维