Android 方法SetSuggestionAdapter无法应用于给定类型

Android 方法SetSuggestionAdapter无法应用于给定类型,android,search,searchview,simplecursoradapter,Android,Search,Searchview,Simplecursoradapter,我正在尝试实施搜索活动,但遇到此错误我不确定如何解决: 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 c

我正在尝试实施搜索活动,但遇到此错误我不确定如何解决:

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

我的解决方案是导入SearchView作为
导入android.widget.SearchView
如果您
导入android.support.v7.widget.SearchView因此它可能是错误的原因

试试这个吧。
谢谢。

我的解决方案是导入SearchView作为
导入android.widget.SearchView
如果您
导入android.support.v7.widget.SearchView因此它可能是错误的原因

试试这个吧。 谢谢