2014-04-21 17 views
0

晚上好,我是學習移動應用程序的Java和XML的新手,對你們有一個快速的問題。在根目錄下的文檔中的標記必須是格式良好的(不能刪除多餘的行)

我試圖編輯在這裏一個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="vertical" > 

    <Button 
     android:id="@+id/button" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:text=""/> 

    </LinearLayout> 
<menu xmlns:android="http://schemas.android.com/apk/res/android"></menu> <----- (this is the line that keeps coming back after being deleted) 

回答

2

刪除xml文件並從頭開始重新創建它。

嘗試crtl + shift + F來格式化文檔。

希望它會有所幫助。

相關問題