我在这里的一个小 android 项目有一点问题。
每次我加载某个项目时,VS 都会在几秒钟后崩溃。好吧...我已将每个类添加到一个新项目中并打开它以查看 VS 何时崩溃,但我发现问题不是类,布局使 VS 崩溃。以下两个(几乎完全相同)代码使其单独崩溃。你能告诉我他们有什么问题吗?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minWidth="25px"
android:minHeight="25px">
<TableLayout
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/tableLayout1">
<TableRow
android:id="@+id/tableRow1">
<TextView
android:text="@string/lbEqID"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="0"
android:id="@+id/lbEqID" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="2"
android:id="@+id/lbEqIDVar" />
</TableRow>
<TableRow
android:id="@+id/tableRow2">
<TextView
android:text="@string/lbEqDesc"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="0"
android:id="@+id/lbEqDesc" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="2"
android:id="@+id/lbEqDescVar" />
</TableRow>
<TableRow
android:id="@+id/tableRow3">
<TextView
android:text="@string/lbTaskID"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="0"
android:id="@+id/lbTaskID" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="2"
android:id="@+id/lbTaskIDVar" />
</TableRow>
<TableRow
android:id="@+id/tableRow4">
<TextView
android:text="@string/lbTaskDesc"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="0"
android:id="@+id/lbTaskDesc" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="2"
android:id="@+id/lbTaskDescVar" />
</TableRow>
<TableRow
android:id="@+id/tableRow5">
<TextView
android:text="@string/lbTaskDate"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="0"
android:id="@+id/lbTaskDate" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="2"
android:id="@+id/lbTaskDateVar" />
</TableRow>
</TableLayout>
</LinearLayout>
和这个
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableLayout
android:minWidth="25px"
android:minHeight="25px"
android:id="@+id/tableLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content">
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/textView1"
android:layout_column="0" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="2"
android:id="@+id/textView11"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:id="@+id/tableRow3" />
<TableRow
android:id="@+id/tableRow4">
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="0"
android:id="@+id/textView12" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="2"
android:id="@+id/textView13"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
</TableRow>
<TableRow
android:minWidth="25px"
android:minHeight="25px"
android:id="@+id/tableRow5" />
<TableRow
android:id="@+id/tableRow6">
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="0"
android:id="@+id/textView26" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="2"
android:id="@+id/textView28"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
</TableRow>
<TableRow
android:minWidth="25px"
android:minHeight="25px"
android:id="@+id/tableRow7" />
<TableRow
android:id="@+id/tableRow8">
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_column="0"
android:id="@+id/textView27" />
<TextView
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/textView29"
android:layout_column="2"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
</TableRow>
</TableLayout>
</LinearLayout>