Android项目“error: Apostrophe not preceded by \ (”报错解决方法

来源:互联网 发布:js组件开发例子 编辑:程序博客网 时间:2024/06/01 09:43
当我们用Eclipse环境开发Android项目,如果编译时控制台报出“error: Apostrophe not preceded by \ (”这种错误,那么多半是因为我们项目中的一个strings.xml文件里有一个string标签中的字符串含有’,我们只要在’之前加\进行转义就可以解决这个错误,比如把Can’t修改为Can\’t就可以了。
0 0
原创粉丝点击