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 a Blog Reader Android App Using Intents to Display and Share Posts Easy Sharing with Intents

Create a new element at the top level, in TEMP

When I go to Menu -> blog_web_view.xml to add a new item, there is nothing to select. It says "Create a new element at the top level, in Temp" as opposed to "...top level, in Menu"

What's going on and how do we resolve this issue?

1 Answer

Harry James
Harry James
14,780 Points

It's just a bug in Eclipse, I get it a few times. You can always add from the XML view if this happens or, you can try restarting Eclipse, that often fixes the problem for me :)

Nathan Fuller
Nathan Fuller
560 Points

I'm also getting this error. Restarting Eclipse did not resolve for me. Not sure how to add it in the XML but I'll try to look it up.

Harry James
Harry James
14,780 Points

Hello Nathan, you can open the XML View by clicking file.xml at the bottom of the editor.

See this image: http://gyazo.com/b0dba7ba6b1c7d5823cc727ca368577f for an example of how to do this in strings.xml.

Be sure to check the XML View so that it has no errors (These will cause your strings to break). And, to add a new string, follow this format:

<string name="id_of_string">Value for the String</string>

Hope it helps! :)