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

@drawable/ic_action_search

I'm going through the developer.android.com getting started section, and when i tried to make a new XML item which included this:

<item android:id="@+id/action_search"
          android:icon="@drawable/ic_action_search"
        />

it doesn't recognize action search.

cannot resolve symbol

2 Answers

@drawable references a drawable resource, usually located in the res/drawable-xxx folder (where xxx is the display resolution such as hdpi/ldpi/etc). It can't find ic_action_search because you don't have it in your project. That icon is included in the Action Bar Icon Pack. Simply download the icon pack and copy the missing icons into their corresponding folders.

Duh...can't believe i missed that haha.

thanks so much!