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 Getting Text from an EditText

Correct code for Interactive Story

Is there a place I can get the proper code for the Interactive story, so I can copy/paste it into my activity? At the end of the lesson "Build an Interactive Story" I am getting several messages about "Should use @string resource". I have tried to follow Ben's lessons, but obviously missed something.

Thanks for your help. Hopefully I'll still be able to carry on even with all the red "squigglies"

1 Answer

You will get to @string resource in time. The message you're given is just a warning since you're hard-coding a string and that should not be done. Why? Image you had to use the same message 200 times. Now image you had to change it. Not that good huh? That's why we use string recources. You declare a string and use it anywhere you want. Then if you need to change it, you just change the source. Keep uo with the videos and you'll get there soon enough.

Sorry Kristian I am not able to proceed with the Adding a Second Activity lesson until I clear up this problem. I guess I'll just go back and check each line again as Ben works through it.