渲染期间引发的异常: 字符串索引超出范围: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/