Search code examples
androidsearchview

search action bar example not working


http://www.android86.com/android-advanced/action-bar-search-view/

Above is the link to implement search inside action bar. However, in the entire application there is one error that i'm not able to fix. Inside ActionBarSearchView.java line 64 for variable "searchables"

Type mismatch: cannot convert from element type Object to SearchableInfo


Solution

  • Change:

       List searchables = searchManager.getSearchablesInGlobalSearch();
    

    to

      List<SearchableInfo> searchables = searchManager.getSearchablesInGlobalSearch();