在Android中的strings.xml文件中有错误 [英] Error in strings.xml file in Android

查看:160
本文介绍了在Android中的strings.xml文件中有错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经声明了一个长字符串中的应用string.xml。

I have declared a long string in "string.xml" of a application.

宣这样

<string name="terms">PLEASE READ THESE TERMS OF USE CAREFULLY  BY ACCESSING THIS .................</string>

但是,这提供了以下错误:

But this gives the following error :

error: Apostrophe not preceded by \ (in PLEASE READ THESE TERMS OF USE CAREFULLY

任何人都可以建议我,为什么说到?

Can anyone suggest me, why it comes ?

推荐答案

发表您的完整的字符串。虽然,我的猜测是有一个单引号(')字符的字符串。其替换(\'),它会解决这个问题。例如,

post your complete string. Though, my guess is there is an apostrophe (') character in your string. replace it with (\') and it will fix the issue. for example,

//strings.xml
<string name="terms">
Hey Mr. Android, are you stuck?  Here, I\'ll clear a path for you.  
</string>

编号:

<一个href="http://www.mrexcel.com/forum/showthread.php?t=195353">http://www.mrexcel.com/forum/showthread.php?t=195353

<一个href="http://$c$c.google.com/p/replicaisland/issues/detail?id=48">http://$c$c.google.com/p/replicaisland/issues/detail?id=48

这篇关于在Android中的strings.xml文件中有错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆