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 trialbong zi jiang
616 Pointslayout file
in the video at 3:41 to end say some call yellow warning errors can some tell what is this should i fix it and how to fix it?
Steve Hunter
57,712 PointsHi there,
Can you paste a link to the video please?
Thanks,
Steve.
4 Answers
Steve Hunter
57,712 PointsSeth is correct - the warning is caused by you hard-coding a string rather than using the resource file; don't worry about it. You code will still work fine - just carry on through the course and it'll all get fixed at the right time. You'll come to that later on.
Steve.
Seth Kroger
56,413 PointsSadly your question didn't get linked to the video you were mentioning. It sounds like you typed in the actual strings into the layout (hard-coding) instead of using a @string/identifier to point to a string resource. These are strings that are kept in the file strings.xml in the res/values folder. If you are just starting out on Android it isn't strictly necessary to fix it, but it is a best practice to use string resources. It keeps you string text in one place and allows you to substitute translations in other languages you have automatically based on the device's local language settings.
bong zi jiang
616 Pointswhy should i change refactor ? if i don change it app will not correctly ? or something else will happen?
bong zi jiang
616 Pointsbong zi jiang
616 Pointsstring resouce?