在Android中的strings.xml文件中有错误中有、错误、文件、Android

2023-09-05 09:57:44 作者:唯情不換人心

我已经声明了一个长字符串中的应用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>

编号:

http://www.mrexcel.com/forum/showthread.php?t=195353

http://$c$c.google.com/p/replicaisland/issues/detail?id=48

 
精彩推荐
图片推荐