Android : Found byte-order-mark in the middle of a file(Android : Found byte-order-mark in the middle of a file)

1. 首先,打包App,然后打包报错,

views里提示,要加上  

android { lintOptions { checkReleaseBuilds false //不检查发布版中的错误 abortOnError false //即使sdk 版本错了也要继续执行 }}

就很奇怪,之前都正常,为什么要加这个,

然后查文件,发现国际化的strings.xml文件中有个小小的报红

Found byte-order-mark in the middle of a file

Inspection info: Lint will flag any byte-order-mark(BOM) characters it finds in the middle of a file,

Since we expect files to be encoded with UTF-8(see the EnforceUTF8 issue),the BOM characters are not necessary, and they are not handled correctly by all tools, For wxample  …

太多就不打字了,简单来讲就是国际化文件有问题,

我看不出来那里的问题,就将报错的那一行的国际化的英文改了改,符号改成英文符号,

就OK了,

————————

1. First, package the app, and then package the error report,

In the views, you should add

Android {lintoptions {checkreleasebuilds false / / do not check the errors in the release version. Abortonerror false / / continue to execute even if the SDK version is wrong}}

It’s strange. It was normal before. Why add this,

Then check the file and find a small red flag in the internationalized strings.xml file

Found byte-order-mark in the middle of a file

Inspection info: Lint will flag any byte-order-mark(BOM) characters it finds in the middle of a file,

Since we expect files to be encoded with UTF-8(see the EnforceUTF8 issue),the BOM characters are not necessary, and they are not handled correctly by all tools, For wxample  …

Too many don’t type. In short, there is a problem with international documents,

I couldn’t see the problem there, so I changed the International English of the line reporting the error and changed the symbol into English symbol,

It’s OK,