Finally I found the solution. Changing namespace of actionViewClass from android:actionViewClass to app:actionViewClass Implementing android.support.v7.widget.SearchView.OnQueryTextListener interface for current activity. Directly use setOnQueryTextListener instead of SearchViewCompat.setOnQueryTextListener @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu, menu); MenuItem searchItem = menu.findItem(R.id.action_search); SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem); if (searchView != null) { searchView.setOnQueryTextListener(this); } return super.onCreateOptionsMenu(menu); … Read more