vishal patel vishal patel - 15 days ago 5
Android Question

Apostrophe not preceded by "\"

I am using this xml string:

<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>


And I get this error:

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/.)


how can I solve this?

Answer

As the error suggests, just add a backslash to escape the apostrophe:

<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>