2012-03-23 80 views
0

我正在準備我的android應用程序,我想在其中創建兩行。在第二個tableRow上顯示此錯誤。但我無法理解,如何解決該錯誤。 錯誤是「繼根元素的文檔中的標記也必須是良好的。」這是在第二錶行xml文件中的錯誤

<?xml version="1.0" encoding="utf-8"?> 

<TableRow 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/tableRow1"> 

    <!-- Screen Design for the SONGS --> 
<ViewFlipper android:id="@+id/viewFlipper1" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" > 
    </ViewFlipper> 

</TableRow> 

<TableRow 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:id="@+id/tableRow2" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" > 

</TableRow> 
+0

什麼是錯誤? – 2012-03-23 18:57:49

+0

根元素之後的文檔中的標記必須是格式良好的。它是在第二行 – Ashishsingh 2012-03-23 19:05:42

回答

2

未來如果是整個XML文件,它缺少一個「根」元素因此不是格式良好的XML

+0

如何解決該錯誤? – Ashishsingh 2012-03-23 19:06:07

+0

你必須包裝標誌在一些外包含包裝。頂層只能有一個元素 – 2012-03-23 19:08:01

+0

我假設XML被構造爲一些描述的配置信息?你需要看文檔,並確定什麼是合適的根元素 – 2012-03-23 19:09:05