Android Studio Error: Illegal characters: ' \ufeff ' and Gradle cannot automatically find XML custom attributes

Source: Internet
Author: User

one, illegal characters: ' \ufeff '

prompt when importing a project into Studio Error: Illegal character: ' \ufeff ' , the compiler did not error, but the compilation error, more headaches, and later found that the reason is because there is no use UTF-8 No BOM mode , Open the file with notepad++ or another editor and change the format to resolve it:



note: eclipse can intelligently convert a BOM file to a BOM-free file, currently Andorid studio did not do the processing. Below also simple say what is BOM (B byte order mark , is the name of the Uniform Code character located at the code point U+feff. When UTF-16 or UTF-32 is used to encode a string of ucs/Uniform code characters, this character is applied to indicate its byte order. It is often used as a notation for marking documents encoded in UTF-8, UTF-16, or UTF-32. The popular point is understood as


Second, Gradle cannot automatically find XML custom attribute problems

Gradle does not automatically find custom properties when a layout XML file appears:

In Gradle projects, always use Http://schemas.android.com/apk/res-auto for custom attributes




custom properties  < Span style= "Color:rgb (51, 51, 255); >http://schemas.android.com/apk/res/ http://schemas.android.com/apk/res-auto  > you can. example:



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android Studio Error: Illegal characters: ' \ufeff ' and Gradle cannot automatically find XML custom attributes

Related Article

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.