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 Build an Interactive Story App (Retired) User Input Using EditText for Text Input

mahesh gurbaxani
mahesh gurbaxani
1,420 Points

String error

Getting an error : Hardcoded String, "Enter your name to begin" should use @String resource.

2 Answers

Daniel Hartin
Daniel Hartin
18,106 Points

Hi Mahesh

I see you are just starting out with android, the hard coded string error is just an advisory note as ideally you should define all your strings inside the string resource folder and refer back to them by using their name and not typing the string directly.

By defining all the strings in one place it makes it much easier to implement different language functionalities and/or edit the strings however you can ignore this error for now, string resources are explained in later courses.

If you do want to read up on the benefits of using string resources and learn how to implement them now (it's not too difficult) I have included the link to the documentation below.

http://developer.android.com/guide/topics/resources/string-resource.html

Hope this helps Daniel