3

i have a problem when building android project.

i build android project and i get an error. the error is : "Error in an XML file: aborting build.".i tried all solution.

  • I deleted main.out.xml. After that, i cleaned up the project. But it didn't work
  • There is no error in xml file
  • I deleted bin folder. It worked at first. But when i change anything in xml file, i get same error

My xml file is :

<?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>
Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
Mahmut EFE
  • 5,137
  • 5
  • 46
  • 56

1 Answers1

5

Make sure your xml filename as small letter and don't use number. Use only dot eg main.xml. After create xml right click >Source>Format. Run your application good luck.

Ngathet
  • 96
  • 3