在 我有这个野兽般的条目(归结为合理的最小值以重现效果):
<item>100% foo 40%bar</item>
这会产生这些错误:
Multiple annotations found at this line:
- error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
- error: Found tag </item> where </string-array> is expected
添加 formatted="false" 不会改变任何事情。
<item>100% foo 40%bar</item>
导致相同的错误消息。和?
<item>100% foo 40bar</item>
<item>100 foo 40%bar</item>
<item>100% foo 40%</item>
一切都会很好。
使用 \% 转义它会被忽略,从而导致相同的错误。 %% 不会导致错误,但我得到 %%。
The %
是 XML 中的保留字符,例如<
, >
, ETC。
使用%%
对于每个%
您在字符串资源中使用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)