09-09 16:08:41.554: E/Weaver(13140):
09-09 16:08:41.554: E/Weaver(13140): android.content.res.Resources$NotFoundException: String resource ID #0x61
09-09 16:08:41.554: E/Weaver(13140): at android.content.res.Resources.getText(Resources.java:242)
09-09 16:08:41.554: E/Weaver(13140): at android.widget.TextView.setText(TextView.java:3854)

错误

错误:android.content.res.Resources$NotFoundException: String resource ID #0x1

原因:一般发生在参数 int resId 错误,你把String赋值给int的resId,所以编译器找不到正确的resource于是报错。

最简单的例子,检查一下你的Toast.makeText()啊textView.setText啊之类的函数,这种函数通常有几个重载,如:

textView.setText(CharSequence text);

textView.setText(int resId);

......

如果不小心将一个int值传给了它,那它不会显示该int值,而是跑到工程下去找一个对应的resource的id,当然是找不到的,于是就报错。

异常 android.content.res.Resources$NotFoundException: String resource ID #0x61的更多相关文章

  1. (转载)android:android.content.res.Resources$NotFoundException: String resource ID #..

    android.content.res.Resources$NotFoundException: String resource ID #0x0 找不到资源文件ID #0x0 原因分析如下: 遇到这种 ...

  2. android.content.res.Resources$NotFoundException:String resource ID #ffffffff

    无语,搞了半天,只能去插这个错误代号,结果就找到了这个结果. scoreTextView.setText(score+""); 这个一定要自己手动转换..不科学啊..关键是在ecl ...

  3. android.content.res.Resources$NotFoundException: String resource ID #0x1

    之前忘了记录这个错误,今天又遇到了.唉,人不能纵容自己犯懒,遂记录之. 错误:android.content.res.Resources$NotFoundException: String resou ...

  4. Android报“android.content.res.Resources$NotFoundException: String resource ID #0x2”错误

    Android报“android.content.res.Resources$NotFoundException: String resource ID #0x2”错误 当调用setText()方法时 ...

  5. android.content.res.Resources$NotFoundException: String resource ID #0x0报错

    报错:android.content.res.Resources$NotFoundException: String resource ID #0x0 原因:在setText()中使用了int型的参数 ...

  6. android.content.res.Resources$NotFoundException: String resource ID #0x0

    仔细检查是不是在settext的时候设置进去的时int属性的值,所以android会认为这是在strings中的值,所以会拿着这个int值当做string的id值去找,结果当然是找不到的.

  7. Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0

    如果遇到这个问题,首先考虑以下原因: 你是否在setText()方法中设置了一个int型变量,比如setText(10). 这样Android系统就会主动去资源文件当中寻找, 但是它不是一个资源文件I ...

  8. Android 的坑一 :android.content.res.Resources$NotFoundException: String resource ID #0x0 找不到资源文件ID #0x0

    原因分析如下: 遇到这种情况,很有可能是把一个int型业务数据的 设置setText()或者类似的方法中, 这样Android系统就会主动去资源文件当中寻找, 但是它不是一个资源文件ID, 所以就会报 ...

  9. android.content.res.Resources$NotFoundException: String resource ID #0xb

    原代码: protected void convert(BaseViewHolder helper, Student item) { helper.setText(R.id.item_tv_realm ...

随机推荐

  1. SQL Server 中WITH (NOLOCK)浅析(转)

    概念介绍  开发人员喜欢在SQL脚本中使用WITH(NOLOCK), WITH(NOLOCK)其实是表提示(table_hint)中的一种.它等同于 READUNCOMMITTED . 具体的功能作用 ...

  2. 表格表格中获取不到button选择器

    今天做一个表单提交,怎么也拿不到button的选择器,不管用$(“#btn_update”)还会getElementById("btn_update"),浏览器也是谷歌没问题,后来 ...

  3. Windows 10 Certified with Oracle E-Business Suite

    Microsoft Windows 10 (32-bit and 64-bit) is certified as a desktop client operating system for end-u ...

  4. Maven知识点简要

      1.依赖管理 <dependencies> <dependency> <groupId>net.sf.json-lib</groupId> < ...

  5. 【Prism】MEF版EventAggregation

    引言 第三弹是EventAggregation Demo的改造. EventAggregation  EventAggregation事件聚集是Prism框架中的通信实现.它可以在松散的模块或者窗体之 ...

  6. LeetCode OJ:Contains Duplicate(是否包含重复)

    Given an array of integers, find if the array contains any duplicates. Your function should return t ...

  7. hbase-0.20.6/bin/hbase-daemon.sh: Permission denied

    部署hbase全分布式时,出现以下错误:主机的hbase启动了,但是从机的没启动[root@centos7- my.shells]# start-hbase.sh Java HotSpot(TM) - ...

  8. L123

    My heart, the bird of the wilderness, has found its sky in your eyes. 我的心是旷野的鸟,在你的双眼中找到了天空.His main ...

  9. boost开发指南

    C++确实很复杂,神一样的0x不知道能否使C++变得纯粹和干爽? boost很复杂,感觉某些地方有过度设计和太过于就事论事的嫌疑,对实际开发工作的考虑太过于理想化.学习boost本身就是一个复杂度,有 ...

  10. 场景中GameObject无法用代码隐藏问题(setActive为false)

    GameObject不受代码控制隐藏问题:代码中若对某个gameobject.setActive(false),发现会不起作用,总结下来发现是和object所在模型组的Animator组件的anima ...