Android compilation Error--layout error parsing Xml:not well-formed (invalid token)

Source: Internet
Author: User

After modifying the Android layout file, the compilation appears error parsing Xml:not well-formed (invalid token).

First to troubleshoot the XML file encoding format is UTF-8, <?xml version= "1.0" encoding= "Utf-8"?>, note that copy from elsewhere to pay attention to the encoding format!

If there are any omissions in each label, move the mouse arrow to the wrong layout and click the right mouse button to select source and then choose Format.

There is no problem, the result found fault (line 9th):

1 <TextView2 3      Android:id= "@+id/tetxview1"4 5 Android:layout_width= "Wrap_content"6 7 Android:layout_height= "Wrap_content"8 9      Android:text= ">31"Ten  One android:textsize= "@dimen/text_size" A  - Android:textcolor= "@color/text_color" -  the    />

Include ">" or "<" in the value of the control property, it will be an error, it is recommended to assign a value in the code!

Android compilation Error--layout error parsing Xml:not well-formed (invalid token)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.