我的项目中有很多字符串,其中包含没有反斜杠的撇号(')并且没有任何问题,直到我添加了另一个字符串,恰好有一个叛徒并且我收到了
<string name="sec_fourth_para">The WRX\’s previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.</string>
错误:撇号未通过\
进行我添加了\我仍然收到错误。搜索会显示一个类似的帖子,说明\将解决此问题。除了停止使用Eclipse之外的任何其他建议吗?
答案 0 :(得分:4)
根据此表:HTML codes
使用撇号代码'
(',单引号)
<string name="sec_fourth_para">The WRX's previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.</string>
或’
(',右单引号)
<string name="sec_fourth_para">The WRX’s previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.</string>
我推荐使用html代码,例如我使用©版权符号,然后我的字符串必须是:
<string name="copyright_ap">© Copyright</string>
答案 1 :(得分:3)
那是因为你在这句话中使用的撇号不是那个u+0027我想你必须从某个地方复制粘贴文本。只需删除撇号并重新输入即可。
答案 2 :(得分:0)
它可以使用'
The WRX`'`s previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.