开发者

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

开发者 https://www.devze.com 2023-03-19 13:02 出处:网络
I need to place a raw 开发者_如何学运维*.txtfile in my android-project to read from it and output general terms and conditions in a dialog.

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

精彩评论

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