日食撇号之前没有

时间:2014-02-07 17:24:49

标签: android xml eclipse

我的项目中有很多字符串,其中包含没有反斜杠的撇号(')并且没有任何问题,直到我添加了另一个字符串,恰好有一个叛徒并且我收到了

<string name="sec_fourth_para">The WRX\’s previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.</string>

错误:撇号未通过\

进行

我添加了\我仍然收到错误。搜索会显示一个类似的帖子,说明\将解决此问题。除了停止使用Eclipse之外的任何其他建议吗?

3 个答案:

答案 0 :(得分:4)

根据此表:HTML codes

使用撇号代码&#39;(',单引号)

<string name="sec_fourth_para">The WRX&#39;s previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.</string>

&#8217;(',右单引号)

<string name="sec_fourth_para">The WRX&#8217;s previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.</string>

我推荐使用html代码,例如我使用©版权符号,然后我的字符串必须是:

<string name="copyright_ap">&#169; Copyright</string>

答案 1 :(得分:3)

那是因为你在这句话中使用的撇号不是那个u+0027我想你必须从某个地方复制粘贴文本。只需删除撇号并重新输入即可。

enter image description here

答案 2 :(得分:0)

它可以使用&apos;

工作或尝试
The WRX`&apos;`s previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.