Error(1,1)illegalcharacter '\ufeff' when compiling on android studio

后端 未结 15 1678
旧巷少年郎
旧巷少年郎 2020-12-14 05:50

I got an Eclipse project source code(I was told that on Android Studio, maybe they just confused), and I start to migrating the code to android studio refers to

15条回答
  •  自闭症患者
    2020-12-14 06:34

    That's a problem related to BOM (Byte Order Mark) character. Byte Order Mark BOM is a Unicode character used for defining a text file byte order and comes in the start of the file. Eclipse doesn't allow this character at the start of your file, so you must delete it. For this purpose, use a rich text editor, such as Notepad++, and save the file with encoding "UTF-8 without BOM." That should remove the problem.

提交回复
热议问题