小编Ane*_*esh的帖子

android.content.res.Resources $ NotFoundException:字符串资源ID#0x1错误

ListView用来在Android中动态添加复选框.我正在使用一个ContextAdapter类来添加膨胀ListView.我的错误日志如下:

09-23 13:44:45.000: E/AndroidRuntime(1192): FATAL EXCEPTION: main
09-23 13:44:45.000: E/AndroidRuntime(1192): Process: com.project.attendancemanager, PID: 1192
09-23 13:44:45.000: E/AndroidRuntime(1192): android.content.res.Resources$NotFoundException: String resource ID #0x1
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.content.res.Resources.getText(Resources.java:244)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.widget.TextView.setText(TextView.java:3888)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at com.project.attendancemanager.CustomAdapter.getView(CustomAdapter.java:31)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.widget.AbsListView.obtainView(AbsListView.java:2263)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.widget.ListView.onMeasure(ListView.java:1175)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.view.View.measure(View.java:16497)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.widget.RelativeLayout.measureChild(RelativeLayout.java:689)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:473)
09-23 13:44:45.000: E/AndroidRuntime(1192):     at android.view.View.measure(View.java:16497)
09-23 13:44:45.000: …
Run Code Online (Sandbox Code Playgroud)

android exception

34
推荐指数
2
解决办法
4万
查看次数

从php中的数组中删除空值

我在php $ arr("ABC","","XYZ","","")中有一个数组.现在我想修剪数组中的空值并想要$ arr("ABC","XYZ").并且元素编号也必须同样操作,这意味着"XYZ"必须在修剪后将键值设置为1.我们该怎么做呢?提前致谢!干杯!

php arrays null

0
推荐指数
1
解决办法
50
查看次数

标签 统计

android ×1

arrays ×1

exception ×1

null ×1

php ×1