实体名称必须紧跟实体引用中的“&”

Jai*_*odi 1 string android

我为string.xml文件中的银行名称列表创建了字符串数组。当我使用项目名称State Bank of Bikaner & Jaipur作为数组项目时:

 <item>State Bank of Bikaner & Jaipur</item>
Run Code Online (Sandbox Code Playgroud)

我收到以下错误: "The Entity name must Immediately follow the '&' in the entitiy reference"

关于如何解决这个问题的想法?任何帮助将不胜感激。

ElG*_*lan 6

&符号在XML实体符。如果您想在 XML 中放置一个文字&符号,则需要使用&amp;,它是&符号的标准实体。