android在String资源文件中加入符号
16lz
2021-01-26
实际开发中,我们会在String资源文件写的时候,会有这样的情况发生:how & what are you ?
当遇到这样的情况的时候,特别是遇到"&",资源会报错。The entity name must immediately follow the '&' in the entity
reference.
那如何解决呢?
<string name="tips">how <![CDATA[&]]> what are you</string>
这样书写后,就不会报错了。
更多相关文章
- You need to use a Theme.AppCompat theme (or descendant) with
- Android之Resource介绍和使用
- Android(安卓)资源目录的相关知识
- Android(安卓)OkHttp, 一行代码 OkHttp提升请求稳定性
- Android(安卓)打包, 不同渠道使用 不同的资源文件
- android中图形图像处理之drawable用法分析
- android重试执行
- android 指定打包资源文件的方法
- Android(安卓)Studio报错 程序包android.support.annotation不存