android.content.res.Resources$NotFoundException: String resource ID #0x1
来源:互联网 发布:麦子学院 python 彭亮 编辑:程序博客网 时间:2024/05/21 17:49
这个问题一般是由于TextView设置内容的时候是int而不是string。
例如:
public class MainActivity extends AppCompatActivity { private int a=1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView tv= (TextView) findViewById(R.id.tv); tv.setText(a); }}
这样设置int,项目不会提示错误,但是运行会报错。就会提示如上问题,提笔以记之
阅读全文
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
- fiddler
- 超级详细的swift语言搭建项目框架
- 交叉编译opencv3.1.0和opencv_contrib/,在R16上运行HelloOpencv程序
- Spark Streaming 实战案例(五) Spark Streaming与Kafka
- ViewPager网络请求图片并无限轮播
- android.content.res.Resources$NotFoundException: String resource ID #0x1
- java学习日志 函数的两个明确
- java进阶之路
- js oop之继承
- Java double/float数据类型中的0.0和-0.0问题
- 快速实现图片点击放大缩小,支持url
- Lua Table的四种遍历方式
- 对ajax的二次封装,返回接收到的数据
- 【大话数据结构】特殊线性表:栈与队列