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

后端 未结 15 1710
旧巷少年郎
旧巷少年郎 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:15

    The ideas in here certainly helped me but the outcome was a little different.

    I did convert my file encoding from UTF-8 to UTF-16. I was then presented with a different error. When i converted it back to UTF-8, I noted that there was a string of unrecognizable characters before my code line. I removed them and recompiled and it worked well.

    My conclusion is somehow an unrecognizable character snuck into my code. Could be programmer error, or a blind copy/paste from the web that placed a nasty hidden character. Carrying the process above as outlined by our peers here somehow allowed me to see it.

    If you'll follow this idea above, please make sure to clean/rebuild between each conversion.

提交回复
热议问题