这个是使用ListView 的ArrayAdapter 加载自定义布局的时候跟布局没有使用TextView 引起的,处理方法就是跟布局换成TextView

如下

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="50dp"android:text="1111"android:gravity="center"android:textColor="#ff0000"android:textSize="25sp">
</TextView>

ArrayAdapter requires the resource ID to be a TextView相关推荐

  1. Spinner 使用的使用 报错:ArrayAdapter requires the resource ID to be a TextView

    Spinner 使用的使用 报错:ArrayAdapter requires the resource ID to be a TextView 的问题 是修改layout的最外成不是使用TextVie ...

  2. 如何解决ArrayAdapter requires the resource ID to be a TextView

    今天碰到这样一个难题,搞了很久都没搞定,到网上搜索了一下,发现有很多人都在问这样的问题,现在将自己解决和分析的结果放置如下: 在ArrayAdapter()这个类中有多个构造方法,我仅据此列以作代表: ...

  3. 【Android踩过的坑】5.android.content.res.Resources$NotFoundException: String resource ID #0x0

    [Android踩过的坑]5.android.content.res.Resources$NotFoundException: String resource ID #0x0 情况: TextView ...

  4. alertdialog报错_AlertDialog异常:Resources$NotFoundException: Resource ID #0x0 in AlertDialog

    背景介绍 今天需要对弹出式对话框进行重构,即单独提出这个对话框,然后获取对话框单击的值.由于当前项目不能随意修改所以只有新建一个类进行修改了. 代码如下: public class MyDialogW ...

  5. resource id 3 php,PHP Warning: stat(): stat failed for Resource id

    问题:代码 执行结果: PHP Warning: stat(): stat failed for Resource id #5 修改: <?php $file = fopen("css ...

  6. AndroidStudio中提示:android.content.res.Resources NotFoundException: String resource ID 0x

    场景 在Android Studio中对TextView调用setText时传入的是Int类型的值,就会提示: android.content.res.Resources NotFoundExcept ...

  7. Android之提示android.content.res.Resources$NotFoundException: Resource ID #0x7f08010a

    1 问题 在我的oppo机器上面运行一个页面没有奔溃,但是在红米安卓5.1版本运行页面奔溃,奔溃信息如下 /Timeline(11600): Timeline: Activity_launch_req ...

  8. android编程常见问题- Resource ID #0x7f070001 type #0x12 is not valid

    问题说明: AndroidRuntime(1705): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.e ...

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

    Android报"android.content.res.Resources$NotFoundException: String resource ID #0x2"错误 当调用se ...

最新文章

  1. 机器学习系列18:核函数
  2. 使用Python制作一个简单的刷博器
  3. TwinVQ解码框图
  4. 现代操作系统:第三章 内存管理
  5. QT的QOpenGLShaderProgram类的使用
  6. linux ruby作用域,细说Ruby细化
  7. 听说你还不会归并排序?
  8. Linux负载均衡--LVS
  9. iOS YYText的使用笔记二(YYLabel聊天表情+文字并排)
  10. 优化模型验证关键代码06:多行程旅行商问题(mTSP)
  11. ubuntu安装pytorch3d
  12. win10系统点击控制台自定义快捷键失效问题解决
  13. Web前端——什么是web前端,什么是HTML及其常用标签
  14. Nginx搭建虚拟主机环境
  15. Jenkins集成动态salve报错 连接测试报错:
  16. 深入浅出Mybatis-分页
  17. mysql数据库的连接--买家类目(上)
  18. win10下设置超清晰壁纸
  19. python打开文件管理器
  20. 初学GWT-安装GWT

热门文章

  1. 伍六七带你学算法——栈的使用
  2. 自建WIN10 FTP无法访问的解决方法
  3. 2022-2028年中国干电池制造行业产销需求与投资预测分析报告
  4. Ubuntu 16.04中安装VMware Tools
  5. 解决:sql中将日期字符串当做日期类型处理
  6. jieba分词工具的使用方法
  7. NVIDIA GPU的神经网络自动调度
  8. TensorRT PoolingLayer
  9. 2021年大数据Flink(七):​​​​​​​参数总结
  10. 快速android app开发,快速學會開發 Android App