Issue
I have a string resource value like this:
<string name="you_sure">Are you sure you want to do this?\n(It can't be recovered.)</string>
When build my android project, I constantly get the error:
Error:(377) Apostrophe not preceded by \ (in Are you sure you want to do this?\n(It can't be recovered.))
Why?
Solution
Because you have an apostrophe (the '
in "can't"), and those need to be escaped as \'
. The same holds true for quotes (\"
).
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.