Forum General

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Name cannot begin with the '<' character, hexadecimal value 0x3C.

NeidennXNeidennX Member ✭✭✭

Hi guys, i have a layour that is throwing a warning everytime i build it or rebuild it, the error says: Name cannot begin with the '<' character, hexadecimal value 0x3C.

this is my code....thanks for the help in advance

<?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)"
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

  • DirkWilhelmDirkWilhelm USMember ✭✭✭✭✭
    edited July 2019

    The problem is that you added yout TextView, EditText etc. as attributes of the GridLayout. But you should add them as children elements. Your code is missing the closing ">" of GridLayout and the correct closing tag:

    Try this:

    <?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">
    
      <!-- here goes all your TextView, EditText, etc. -->
    
    </GridLayout>
    
Sign In or Register to comment.