开发者

Eclipse / Android raw txt file error (Content is not allowed in prolog)

I need to place a raw 开发者_如何学运维*.txt file in my android-project to read from it and output general terms and conditions in a dialog. However, Eclipse shows, that my .txt file contains errors (see title). It's not an xml file and should be treated like a raw file. Why the error?!?! How can i fix it?

Thanks in advance.

Solved:

  1. Eclipse restarting does NOT help.
  2. Creating a file with the eclipse 'New File'-Wizard on the raw folder helps. It's kind of a bug.

DONT: Create a file in another folder and put it in the res/raw folder afterwards. Eclipse doesn't recognize the file has been move to a folder where problems should be ignored. Alittle buggy tho.


It sounds like it is interpreting it as an XML file; is it in res/raw or assets/ ? Non-xml resources should be put in one of those two project directories.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜