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了,

 

 

 

上一篇:二分法查找


下一篇:python编程300例之 005二分查找