3

Android プロジェクトのビルド時に問題が発生しました。

Android プロジェクトをビルドすると、エラーが発生します。エラーは次のとおりです:「XMLファイルのエラー:ビルドを中止しています。」.iはすべての解決策を試しました。

  • 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>
4

1 に答える 1

5

xmlファイル名は小文字であり、数字は使用しないでください。main.xmlなどのドットのみを使用してください。xmlを作成したら、>[ソース]>[フォーマット]を右クリックします。アプリケーションを実行してください。

于 2012-10-09T09:24:48.110 に答える