title: Why is android.R.menu_search giving me an error?
body: <p>I'm trying to add a search widget to the action bar and for some reason I'm getting "android.R.menu_search cannot be resolved or is not a field". The code I'm using is </p>
  
  <pre><code>@Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.geolocation_search, menu);
  
          //Get the SearchView and set the searchable configuration
          SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
          SearchView searchView = (SearchView) menu.findItem(android.R.layout.menu_search).getActionView();
          //Assumes current activity is the searchable activity
          searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
          //searchView.setIconifiedByDefault(false);
          return true;
      }
  </code></pre>
  
  <p>The xml file is </p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;item
          android:id="@+id/action_settings"
          android:orderInCategory="100"
          android:showAsAction="never"
          android:title="@string/action_settings"/&gt;
      &lt;item
          android:id="@+id/headers"
          android:showAsAction="always|withText"
          android:title="@string/header1"/&gt;
      &lt;item
          android:id="@+id/menu_search"
          android:actionViewClass="android.widget.SearchView"
          android:icon="@android:drawable/ic_menu_search"
          android:showAsAction="always"
          android:title="@string/search"/&gt;
  
  &lt;/menu&gt;
  </code></pre>
  
  <p>So, what am I doing wrong?</p>