One of the steps you have to follow when creating a Search interface is this one:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/action_search"
android:title="Search"
android:icon="@android:drawable/ic_menu_search"
android:showAsAction="always"
android:actionViewClass="android.widget.SearchView" />
</menu>`
Note that Android Studio will suggest you to use yourapp:showAsAction instead of android:showAsAction, adding a new xml namespace (xmlns:android=”…” on the root element). DON’T DO THAT if you are not using the android-support-v7-appcompat library! Search view will never be displayed.
Don’t fix this issue if you are not using android-support-v7-appcompat. Leave the warning unmodified. Hope this saves you all the time i wasted discovering it 😛