2011-05-01 42 views
-1

剛剛開始android開發,並試圖在這裏創建一個用戶界面..但獲取以下內容:/res/layout/main.xml:13:錯誤:解析XML錯誤:不正確(無效的令牌)在Android中的無效令牌XML

有什麼想法?

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    > 
    <TableLayout android:id="@+id/entryBar" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:stretchColumns="1" 
    > 
    <TableRow 
     <EditText android:id="@+id/taskEntry" /> 
    </TableRow> 
    <TableRow 
     <Button android:id="@+id/add" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Add" 
     /> 
    </TableRow> 
    </TableLayout> 
    <ListView android:id="@+id/tasks" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true" 
    android:layout_above="@id/entryBar" 
    /> 
</RelativeLayout> 

回答

1

您第一<的TableRow

後錯過了>
2

TableRow項目不正確結束,嘗試...

<TableRow> 
    <EditText android:id="@+id/taskEntry" /> 
</TableRow> 
<TableRow> 
    <Button android:id="@+id/add" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Add" 
    /> 
</TableRow>