I\'m not unsure of why I\'m getting this error. Here\'s the menu in question:
instead of using androids
android:actionViewClass="android.widget.SearchView"
you have to use the apps
app:actionViewClass="android.widget.SearchView"
as per the documentation.
In your menu.xml your has to be
<item
android:id="@+id/action_search"
android:icon="@drawable/ic_action_search"
android:title="@string/action_search"
android:showAsAction="collapseActionView|ifRoom"
android:actionViewClass="android.support.v7.widget.SearchView" />
with that change in the last line
you can fixed this issue by doing this job in your code
adding this
import android.widget.SearchView;