error: Error parsing XML: not well-formed (invalid token) …?

后端 未结 9 1054
长发绾君心
长发绾君心 2020-11-29 02:22

I am working on an application, with following XML. but whenI try to clean/build my project the following error occurs:

\"error: Error parsing XML: not well-formed (

9条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 02:56

    I had the same problem. In my case, even though I have not understood why, the problem was due to & in one of the elements like the following where a and b are two tokens/words:

     . . . a & b . . . 
    

    and to resolve the issue I turned my element's text to the following:

     . . . a and b . . . 
    

    I though it might be the case for some of you. Generally, to make your life easier, just go and read the character at the index mentioned in the error message (line:..., col:...) and see what the character is.

提交回复
热议问题