android.widget.SearchView cannot be cast to android.support.v7.widget.SearchView

后端 未结 9 1778
感情败类
感情败类 2020-12-05 14:46

I\'m not unsure of why I\'m getting this error. Here\'s the menu in question:



        
9条回答
  •  旧巷少年郎
    2020-12-05 15:02

    you should use these imports instead of using the support library imports

    import android.app.SearchManager;
    import android.widget.SearchView;
    import android.widget.SearchView.OnQueryTextListener;
    

    Just to keep in mind that the minimum SDK is marked as 14

提交回复
热议问题