撇号之前没有" \"

时间:2016-11-26 08:02:38

标签: android string android-resources

我正在使用这个xml字符串:

<string name="four4">Please see Facebook's privacy policies for the purpose and scope of data collection and the further processing and use of data by Facebook, as well as your rights and setting options to protect your privacy: https://www.facebook.com/about/privacy/.</string>

我收到了这个错误:

Error:(735) Apostrophe not preceded by \ (in Please see Facebook's privacy policies for the purpose and scope of data collection and the further processing and use of data by Facebook, as well as your rights and setting options to protect your privacy: https://www.facebook.com/about/privacy/.)

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:2)

正如错误所示,只需添加一个反斜杠来逃避撇号:

<string name="four4">Please see Facebook\'s privacy policies for the purpose and scope of data collection and the further processing and use of data by Facebook, as well as your rights and setting options to protect your privacy: https://www.facebook.com/about/privacy/.</string>