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

Alex Park
Alex Park
7,567 Points

Cannot add a new item in the Android menu

I am doing the Easy sharing with Intents lessons and i am trying to add an item to the [menu] - [activity_blog_web_view.xml] But i cannot add anything by clicking the button

<item
    android:id="@+id/action_share"
    android:icon="@drawable/ic_action_share"
    android:showAsAction="always"
    android:title="@string/action_share"/>

So i had to write it down But although i save my documents it doesn't show up in the item and it is keep saying error.

The log says something like this

[2014-06-22 20:54:17 - BlogReader] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.alexpark.blogreader/.MainListActivity } [2014-06-22 21:09:02 - BlogReader] Error in an XML file: aborting build.

1 Answer

this code seems fine to me.. is there an error in another part of the xml file or maybe a completely different xml file?

Alex Park
Alex Park
7,567 Points

I dont' know. the red underline doesn't appear in the editor but it shows error in the log :/