Just in string string resource file, wrote a single quotation mark, an error, the wrong code is as follows
Error:apostrophe not preceded by \ (in Ouyangpeng ' s blog)
The resource files are as follows:
<?xml version= "1.0" encoding= "Utf-8"?><resources> <string name= "Ouyang" >ouyangpeng ' s Blog </string> <string name= "blog" > http://blog.csdn.net/ouyang_peng</string></resources>
There are two workarounds, as follows:
The first method: Enclose the string resource of single quotation marks with double quotation marks, as follows:
<string name= "Ouyang" > "Ouyangpeng ' s Blog" </string>
second method: ' \ &NBSP;
, this is done to avoid ambiguity, as follows:
<string name= "Ouyang" >ouyangpeng\ ' s blog </string>
Refer to the previous article: "My Android Advanced Tour------> Report error:apostrophe not preceded by \ Error Resolution"
(Address: http://blog.csdn.net/ouyang_peng/article/details/16939225)
==================================================================================================
Ouyangpeng welcome reprint, sharing with people is the source of progress!
Reprint please keep the original address : Http://blog.csdn.net/ouyang_peng
==================================================================================================
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
My Android Step-by-step tour------>android single quote problem in string resource Error:apostrophe not preceded by solution