我有一个像这样的字符串资源值:
<string name="you_sure">Are you sure you want to do this?\n(It can't be recovered.)</string>
构建我的android项目时,我不断收到错误:
Error:(377) Apostrophe not preceded by \ (in Are you sure you want to do this?\n(It can't be recovered.))
为什么?
答案 0 :(得分:1)
因为您有撇号(&{34}中的'
可以&#39;#34;),并且需要将其转义为\'
。引号(\"
)也是如此。
答案 1 :(得分:0)