我对 android XML 文件有疑问。我创建了一个名为 profile_page.xml 的布局,并从另一个名为 profile_table_layout.xml 的文件中引用了表格边框的布局;下面是 profile_page.xml 文件的代码....
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<include
android:id="@+id/header_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
layout="@layout/header_master" />
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="40dp"
>
<TableLayout android:id="@+id/table_userDesc"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="@drawable/profile_table_layout" >
<TableRow android:id="@+id/tableUserDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:padding="5dp" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:text="TextView"></TextView>
<TextView android:padding="5dp" android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:text="TextView"></TextView>
<TextView android:padding="5dp" android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:text="TextView"></TextView>
</TableRow>
<TableRow android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:padding="5dp" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:text="TextView"></TextView>
<TextView android:padding="5dp" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:text="TextView"></TextView>
<TextView android:padding="5dp" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:text="TextView"></TextView>
</TableRow>
</TableLayout>
</LinearLayout>
</LinearLayout>
我只是有错误代码:
error!
NotFoundException: null
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- TextView
如何解决这个问题?谢谢。