Error parsing XML: not well-formed (invalid token)

NeidennXNeidennX Member ✭✭

i have a new layout and everytime i build or rebuild the project, this error shows up Error parsing XML: not well-formed (invalid token)
i need some help please...thank you

Here is my code

<?xml version="1.0" encoding="utf-8"?>
<GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="2"
android:rowCount="6"
android:id="@+id/gridLayout1"

<TextView
android:text= "Nombre(s)"     --------------------> this is the line were the error is thrown
android:layout_width= "120px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="60px"
android:paddingLeft="20px"
android:id="@+id/LblNombre" 
/>

<EditText
android:id="@+id/TxtNombre"
android:layout_width="285px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="40px"
android:paddingLeft="20px"
android:layout_marginLeft="150px"
/>

<TextView
android:text="Apellido"
android:layout_width="121px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="60px"
android:paddingLeft="20px"
android:id="@+id/LblApellido" 
/>

<EditText
android:id="@+id/TxtApellido"
android:layout_width="285px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="40px"
android:paddingLeft="20px"
android:layout_marginLeft="150px"
/>

<TextView
android:text="Fecha de Nacimiento"
android:layout_width="281px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="60px"
android:paddingLeft="20px"
android:id="@+id/LblFechaNacimiento" 
/>

<EditText
android:id="@+id/TxtFechaNacimiento"
android:layout_width="285px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="40px"
android:paddingLeft="20px"
android:layout_marginLeft="150px"
/>

<TextView
android:text="Enfermedades"
android:layout_width="202px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="60px"
android:paddingLeft="20px"
android:id="@+id/LblEnfermedades" 
/>

<EditText
android:id="@+id/TxtEnfermedades"
android:layout_width="285px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="40px"
android:paddingLeft="20px"
android:layout_marginLeft="150px"
/>

<TextView
android:text="Correo Electronico"
android:layout_width="253px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="60px"
android:paddingLeft="20px"
android:id="@+id/LblCorreo" 
/>

<EditText
android:id="@+id/TxtCorreo"
android:layout_width="285px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="40px"
android:paddingLeft="20px"
android:layout_marginLeft="150px"
/>

<TextView
android:text="Telefono"
android:layout_width="132px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="60px"
android:paddingLeft="20px"
android:id="@+id/LblTelefono" 
/>

<EditText
android:id="@+id/TxtTelefono"
android:layout_width="285px"
android:layout_height="100px"
android:minWidth="30px"
android:minHeight="30px"
android:paddingTop="40px"
android:paddingLeft="20px"
android:layout_marginLeft="150px"
/>


<Button
android:text="Registrar Estudiante"
android:id="@+id/BtnRegistrarEstudiante"
android:layout_marginTop="90px"
android:layout_marginLeft="90"
android:layout_height="170px"
android:layout_rowSpan="6"
android:layout_columnSpan="2"
/>

/>

Answers

  • mirkarammirkaram Member ✭✭

    mostly in .xml files compiler thrown error with wrong line , look at above element of TextView , may be there is some property have this error

  • JoeMankeJoeManke USMember ✭✭✭✭✭
    edited August 8

    Your syntax is wrong for adding children.

    What you're doing is this:

    <GridLayout
       <EditText />
    />
    

    The correct way is like this:

    <GridLayout>
       <EditText />
    </GridLayout>
    
Sign In or Register to comment.