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 trialmichikoote
20,646 Pointschallenge task 5 - syntax error
someone help! this is my last part of answer in Java file.
Resources resources = getResources();
MphoneNumberLabels = resources.getStringArray(R.array.phoneNumberLabels);
"phoneNumberLabels" is same as string-array variable in XML file. I keep getting errors telling me that symbol cant find or match... what am I missing?
2 Answers
Ben Jakuben
Treehouse TeacherLooks like you're using the wrong variable name: MphoneNumberLabels
michikoote
20,646 PointsFigured it out! I didn't need to change the name at all... How simple it was! Thanks a lot.
michikoote
20,646 Pointsmichikoote
20,646 PointsThank you for your help. I changed the variable and this is my entire code in Java. Also, I addd a new array-list named phoneNumberLabels in XML file.
I'm still getting the same error message that symbol (R.array.phoneNumberLabels) cant find on the last line. I'm stuck on this problem. Any advise please.
Ben Jakuben
Treehouse TeacherBen Jakuben
Treehouse TeacherIn your last line, check the name you are using for the array from the strings.xml file. :)