2012-10-09 30 views
3

我建立android項目時出現問題。XML文件中的錯誤:中止構建。在android

我建立android項目,我得到一個錯誤。錯誤是:「XML文件錯誤:中止構建。」。我嘗試了所有的解決方案。

  • 我刪除了main.out.xml。之後,我清理了這個項目。但它沒有工作
  • xml文件沒有錯誤
  • 我刪除了bin文件夾。它起初工作。但是,當我在XML文件中改變什麼,我得到同樣的錯誤

我的XML文件是:

<?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:background="@drawable/background"> 


    <TextView 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:text="Telefon numarası :" 
     />  
    <EditText 
     android:id="@+id/txtPhoneNo" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content"   
     /> 
    <TextView 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content"   
     android:text="Mesaj :" 
     />  

    <EditText 
     android:id="@+id/txtMessage" 
     android:layout_width="fill_parent" 
     android:layout_height="150dp" 
     android:gravity="top" 
     android:text="@string/txtMessage" /> 

    <Button 
     android:id="@+id/btnSendSMS" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:text="@string/btnSendSMS" /> 

</LinearLayout> 
+2

重新啓動你的eclipse。 –

+0

感謝帕德瑪庫馬爾。有效。 –

+1

「Gamecat ison krijthe」,你爲什麼編輯我的問題?沒有錯誤或類似的東西。這是沒有意義的:/ –

回答

5

確保你的XML文件名作爲小信與不使用數量。只使用點,例如main.xml。 創建XML後右鍵單擊>源>格式。運行你的應用程序好運。

+0

v.good提示..仍然不適合我 –