我正在尝试this code来实施搜索活动但我收到此错误我不知道如何解决它:
Error:(326, 19) error: method setSuggestionsAdapter in class SearchView cannot be applied to given types;
required: CursorAdapter
found: SearchSuggestionsAdapter
reason: actual argument SearchSuggestionsAdapter cannot be converted to CursorAdapter by method invocation conversion
答案 0 :(得分:2)
我的解决方案是导入SearchView为import android.widget.SearchView;
如果您import android.support.v7.widget.SearchView;
,那么可能是错误的原因。
尝试这项工作。 感谢。