0

I am get an error because of this tag what is wrong with this string tag can anyone help me out.

<string name="Walt_desc">At the age of 50, Walt works as a high school chemistry teacher in Albuquerque, New Mexico, providing instruction to uninterested and disrespectful students.Since the job does not pay enough, he must work a second job at a car wash, which proves to be particularly humiliating when he has to clean the cars of his own students.Walter is married to Skyler White, they have a teenage son named Walter Jr., who has cerebral palsy. Skyler is also pregnant with their second child, Holly, who is born at the end of season two. Walt's other family includes Skyler's sister, Marie Schrader, her husband, Hank, who is a DEA agent, and his mother, who is never seen</string>

Thanks in advance.

1
  • 1
    write "Walt_desc" in small letter i.e "walt_desc" Commented Mar 7, 2014 at 9:30

2 Answers 2

3

There's an unescaped apostrophe ' in Walt's. Replace with Walt\'s. Similarly in Skyler\'s.

Sign up to request clarification or add additional context in comments.

Comments

2

If you have an apostrophe or a quote in your string, you must either escape it or enclose the whole string in the other type of enclosing quotes. For example, here are some stings that do and don't work:

<string name="good_example">"This'll work"</string>
<string name="good_example_2">This\'ll also work</string>
<string name="bad_example">This doesn't work</string>

So, your code should be,

<string name="Walt_desc">"At the age of 50, Walt works as a high school chemistry teacher in Albuquerque, New Mexico, providing instruction to uninterested and disrespectful students.Since the job does not pay enough, he must work a second job at a car wash, which proves to be particularly humiliating when he has to clean the cars of his own students.Walter is married to Skyler White, they have a teenage son named Walter Jr., who has cerebral palsy. Skyler is also pregnant with their second child, Holly, who is born at the end of season two. Walt's other family includes Skyler's sister, Marie Schrader, her husband, Hank, who is a DEA agent, and his mother, who is never seen"</string>

or

<string name="Walt_desc">At the age of 50, Walt works as a high school chemistry teacher in Albuquerque, New Mexico, providing instruction to uninterested and disrespectful students.Since the job does not pay enough, he must work a second job at a car wash, which proves to be particularly humiliating when he has to clean the cars of his own students.Walter is married to Skyler White, they have a teenage son named Walter Jr., who has cerebral palsy. Skyler is also pregnant with their second child, Holly, who is born at the end of season two. Walt\'s other family includes Skyler\'s sister, Marie Schrader, her husband, Hank, who is a DEA agent, and his mother, who is never seen</string>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.