title: searchManager.getSearchableInfo(getComponentName()) returns null
body: <p>I've followed <a href="http://developer.android.com/training/search/setup.html" rel="noreferrer">this Android guide</a> in order to add a search bar to an activity. The setup looks like this:</p>
  
  <p>res/menu/activity_main.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
  &lt;item
      android:id="@+id/search"
      android:title="@string/menu_search"
      android:icon="@android:drawable/ic_menu_search"
      android:showAsAction="collapseActionView|ifRoom"
      android:actionViewClass="android.widget.SearchView" /&gt;
  &lt;item
      android:id="@+id/menu_settings"
      android:orderInCategory="100"
      android:showAsAction="never"
      android:title="@string/menu_settings"
      android:icon="@drawable/ic_menu_settings"/&gt;
  
  &lt;/menu&gt;
  </code></pre>
  
  <p>res/xml/searchable.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;searchable xmlns:android="http://schemas.android.com/apk/res/android"
      android:label="@string/app_name"
      android:hint="@string/search_hint" /&gt;
  </code></pre>
  
  <p>Activity entry in manifest file:</p>
  
  <pre><code>    &lt;activity
          android:name="de.ivu.realtime.app.activity.MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data
              android:name="android.app.searchable"
              android:resource="@xml/searchable" /&gt;
          &lt;meta-data
              android:name="android.app.default_searchable"
              android:value="de.ivu.realtime.app.activity.MainActivity" /&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>and the code in MainActivity:</p>
  
  <pre><code>@SuppressLint("NewApi")
  @Override
  public boolean onCreateOptionsMenu(Menu menu)
  {
      this.getMenuInflater().inflate(R.menu.activity_main, menu);
  
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.HONEYCOMB)
      {
          SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
          SearchView searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView();
          SearchableInfo searchableInfo = searchManager.getSearchableInfo(getComponentName());
          searchView.setSearchableInfo(searchableInfo);
      }
  
      return true;
  </code></pre>
  
  <p>The call to <code>searchManager.getSearchableInfo(getComponentName());</code> always returns <code>null</code>. I've seen this in other questions on stackoverflow, however, none of the solutions presented there seem to apply to my case.</p>
  
  <ul>
  <li>the menu XML has a <code>&lt;?xml version="1.0" encoding="utf-8"?&gt;</code> header</li>
  <li>the searchable XML has no hard-coded strings</li>
  <li>renaming the menu item does not work</li>
  <li>cleaning and rebuilding does not do the trick either</li>
  </ul>
  
  <p>Any help is very much appreciated. Thanks!</p>