android - 在 android 的 XML 文件中获取错误

标签 android

渲染期间引发的异常: 字符串索引超出范围:0 异常详细信息记录在 Window > Show View > Error Log 中 找不到以下类: - TextView(更改为 android.widget.TextView,修复构建路径,编辑 XML)

Getting this Error when i open graphic layout of XML file. Help me in resolving this. 

最佳答案

您将 Button 的背景用作:android:background="@layout/button_style"

什么是button_style?如果它是一个样式,将代码移动到 styles.xml 或者 如果它是一个 selector 然后将它移动到 drawables。 TextView 中的 tableleftborder 也是如此。

其次,在您的 First TextView 中添加 android:textStyle="normal" 或简单地删除它以使其类似于以下内容:

       <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:text="UGD Demand Details"
        android:textColor="#FFF"
        android:textSize="20sp"/>

希望对您有所帮助:)

关于android - 在 android 的 XML 文件中获取错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28823938/

相关文章:

android - 更改本地脚本端到端测试的端口

android - 不要在 fragment 中获取 rootLayoutContainer(Android 3.0 预览版)

java - 如何停止屏幕旋转而不更改 list

android - 强制崩溃 react native 应用程序以进行错误测试

android - RecyclerView : Inconsistency detected. 无效的项目位置

android - Dart/flutter 每次之后如何定期更改计时器

android - 如何在 kotlin @Parcelize 中使用 null

java - 取消从另一个对话框 fragment 启动的对话框 fragment 会导致非法状态异常

android - 使用我们自己的缓存键将图像存储在 picasso 中

android - 使用 Intent 请求获取用户编号不起作用?