0

I'm new to Android development. I encounter this error while creating mail.xml. Below is the code and I have tried to look for solution on this website still giving the "error parsing XML mismatched tag Android". I will appreciate it if you can help check error in the code.

android:layout_width="match_parent"
android:weightSum="100"
android:layout_height="match_parent"
android:orientation="vertical" >


<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
 <ScrollView android:layout_weight="30" android:layout_width="fill_parent" android:layout_height="fill_parent">

<TextView
    android:text="TextView"
    android:id="@+id/textView1"
    android:layout_width="wrap_content"

     />

<EditText
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:id="@+id/editText1"
    android:ems="10" >



<TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="TextView" />

<EditText
    android:id="@+id/editText2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:ems="10" />

<TextView
    android:id="@+id/textView3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="TextView" />

<EditText
    android:id="@+id/editText3"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:ems="10" />

<TextView
    android:id="@+id/textView4"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="TextView" />

<EditText
    android:id="@+id/editText4"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:ems="10" />

<TextView
    android:id="@+id/textView5"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="TextView" />

<EditText
    android:id="@+id/editText5"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:ems="10" />

<TextView
    android:id="@+id/textView6"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="TextView" />

<EditText
    android:id="@+id/editText6"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:ems="10" />

     </ScrollView>
     </LinearLayout>

    <LinearLayout

                  android:layout_width="match_parent"
                  android:layout_weight="40"
                  android:layout_height="fill_parent"
                  android:orientation="vertical" >

<Button
    android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="fill_content"
    android:text="Button" />
     </LinearLayout>

<LinearLayout android:layout_width="match_parent"
              android:layout_weight="30"
              android:layout_height="fill_parent"
              android:orientation="vertical" >

<AnalogClock
    android:id="@+id/analogClock1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

1

2 Answers 2

0

Your EditText tag isn't closed. Change this

<EditText
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/editText1"
android:ems="10" >

to this

<EditText
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/editText1"
android:ems="10" />
1
  • Thanks, i got this error when I fixed the Edit text tag..what might caused this? error: Error: String types not allowed (at 'layout_height' with value 'fill_content'). mail.xml /Tes/res/layout line 99 Android AAPT Problem Mar 8, 2013 at 15:38
0

I found adding the closing tag like so: </TextView> keeps me from getting random errors like what you got there. With </TextView> I feel it looks more completed and I can see my code clearer. Either way works though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.