Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Stuck on Code Challenge: All About @string Resources,Question 4

Don't understand what I am doing wrong, see below?

<?xml version="1.0" encoding="utf-8"?>
<resources> 
  <string name="saveLabel">Save My Changes</string> 
    <string-array name="phoneNumbers">
                <item>Home</item>
                                 <item> Work</item>
                                     <item>Mobile</item>
</resources>

3 Answers

You need to do a string array ;)

Like this :

<string-array name="animals">
    <item>Bear</item>
    <item>Dog</item>
    <item>Cat</item>
</string-array>
Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

You just have an extra space in front of "Work". Values between element tags in XML are sensitive to white space, so it thinks that white space is part of the value. White space between elements doesn't matter, though, like in HTML.

Thanx for the valuable information Ben