Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Having trouble with Signal from Mars project. Android studio says I need to @String resource
I was watching on how to make a story app and was doing great until I put in "android:contentDescription="Signals from Mars"/>" that i was told to due so in the video. The design screen on the sample phone went blank and was told that I should use a @String resource. I have no idea how to do this since I am still a rookie on making apps and the video have not has this problem. can someone please tell me How I can fix this issue?
Jonas Samulionis6,874 Points
You can actually extract String resource in common ways.
1# Try to hover the android:contentDescription="Signals from Mars" line. You should be able to se the Yellow info bulb on the left side. Click on it and extract the String resource. 2# Place the mouse cursor on "Signals from Mars" and hit "alt + enter", you should now be able to extract the String resource.
Basically the Android Studio creates the String of your contentDescription label. The same way as you can extract the String resources from TextView's, Button labels and so on.
These String resources are placed in your android project res folder. You can find it res/values/strings.xml
I hope it helps! :)
Regards, Jonas :)
Thanks you I think I got it working now. thanks for the advice.