Android string.xml error: Apostrophe not preceded by \
Android string.xml error: Apostrophe not preceded by \
遇到了这个错误,编译无法通过 error: Apostrophe not preceded by \
错误的代码是:
<string name="security_protocol_dialog_content_1_msg">Restoring factory settings, the system will erase the phone's data without warning.</string>
正确的代码是:
<string name="security_protocol_dialog_content_1_msg">Restoring factory settings, the system will erase the phone\'s data without warning.</string>
额外加了一个转义字符(\)
当字符串中包含单引号(')的时候,就需要转义字符进行转义。
XML中的特殊字符:
单引号 ' '
双引号 " "
大于号 > >
小于号 < <
与 & &
Android string.xml error: Apostrophe not preceded by \的更多相关文章
- 关于 Android项目“error: Apostrophe not preceded by \ (”的解决方法
用Eclipse环境开发Android项目,如果编译时控制台报出“error: Apostrophe not preceded by \ (”这种错误,那么多半是因为项目中的一个strings.xml ...
- 我的Android进阶之旅------>Android字符串资源中的单引號问题error: Apostrophe not preceded by 的解决的方法
刚刚在string字符串资源文件里,写了一个单引號.报错了,错误代码例如以下 error: Apostrophe not preceded by \ (in OuyangPeng's blog ) 资 ...
- 我的Android进阶之旅------>Android字符串资源中的单引号问题error: Apostrophe not preceded by 的解决办法
刚刚在string字符串资源文件中,写了一个单引号,报错了,错误代码如下 error: Apostrophe not preceded by \ (in OuyangPeng's blog ) 资源文 ...
- 我的Android进阶之旅------>报 error: Apostrophe not preceded by \ 的错误解决办法
今天对项目进行国际化翻译的时候控制台出现了以下的错误: res/values/strings.xml:100: error: Apostrophe not preceded by \ (in Sorr ...
- 【Android】android string.xml前后加空格的技巧
android string.xml 文字中间加入空格 <string name="password">密 码</string>   ...
- android string.xml %问题
反复检查后发现是string.xml中的 % 导致编译失败, 这是由于新的SDK采用了新版本的aapt(Android项目编译器),这个版本的aapt编译起来会比老版本更加的严格,然后在Android ...
- error: Apostrophe not preceded by \
解决方案为:在编译出错提示中找到相关的string.xml文档,在string标签中的字符串含有单引号(')前面,加上反斜杠(\)转义即可.
- android string.xml里的空格字符
在string.xml定义字符串的时候常常要用到空格, 直接用键盘敲的话不知道是几个空格,常常看错了,导致误删. 假设用 来替代空格的话,就好非常多. 另外使用%1$s,%1$d能够在一个字符串里定义 ...
- Android string.xml 添加特殊字符
解决项目中在string.xml 中显示特殊符号的问题,如@号冒号等.只能考虑使用ASCII码进行显示: @号 @ :号 : 空格 以下为常见的ASCII十进制交换编码: --> <- ...
随机推荐
- grunt切换下载源
nrm 是一个 NPM 源管理器,允许你快速地在NPM 源间切换: 安装:npm install -g nrm 列出可选源:nrm ls 切换:nrm use taobao 测试所有源连接时间:nrm ...
- Linux远程连接与常用命令
要学linux ,一定得用命令界面的,怎么也得是shell语言,用就最难最原始的,用的人都是专家,历史最少也得30年,不管有三七二十一上来就敲ls ,先看看当前目录都有什么.一口专业的linux范儿, ...
- 帝国cms7.2自定义列表建立tag效果 代码 教程
统计记录:(如:select count(*) as total from phome_ecms_news where classid=1 and checked=1) 注:这句SQL的意思是查找统计 ...
- Tomcat embed
http://www.iflym.com/index.php/code/use-embeded-tomcat-to-javaee-start-tomcat.html http://java.dzone ...
- 通往WinDbg的捷径
通往WinDbg的捷径(一) 原文:http://www.debuginfo.com/articles/easywindbg.html译者:arhat时间:2006年4月13日关键词:CDB WinD ...
- 最新VMware Workstation 10注册码,绝对可用!
最近公司要在solaris上测试产品,需要用到虚拟机,于是下载了最新的虚拟机VMware Workstation 10,并找到了破解码,与大家共享: VMware workstation 10破解序列 ...
- Name lookup
Name lookup Types of lookup Argument-dependent lookup Template argument deduction overload resolutio ...
- Oracle 如何写出高效的 SQL
转自:Oracle 如何写出高效的 SQL 要想写出高效的SQL 语句需要掌握一些基本原则,如果你违反了这些原则,一般情况下SQL 的性能将会很差. 1. 减少数据库访问次数连接数据库是非常耗时的,虽 ...
- 循环结构中break、continue、return和exit的区别
1. break break语句的使用场合主要是switch语句和循环结构.在循环结构中使用break语句,如果执行了break语句,那么就退出循环,接着执行循环结构下面的第一条语句.如果在多重嵌套循 ...
- (IOS)Apple 证书相关
1.私钥 本地钥匙串程序创建<证书请求文件>(.certSigningRequest),用其向苹果申请下载<证书文件>/<私钥>(.cer),并安装到钥匙串: 团队 ...