我的项目中有许多字符串,其中包括没有反斜杠的撇号 ('),并且没有任何问题,直到我添加了另一个恰好有撇号的字符串并且我收到了
<string name="sec_fourth_para">The WRX\’s previous 2.0 liter engine was replaced with the 2.5 liter boxer engine.</string>
错误:撇号未由\
进行我已经添加了\,但我仍然收到错误消息。搜索会出现一个类似的帖子,指出\将解决这个问题。除了停止使用 Eclipse 之外,还有其他建议吗?
最佳答案
根据此表: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>
关于android - eclipse 前面没有撇号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21634030/