u_kami
u_kami

Reputation: 575

method setSuggestionsAdapter cannot be applied to given types

I am trying this code to implement a Search Activity but I am getting this error I am not sure how to solve it:

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

Upvotes: 0

Views: 426

Answers (1)

Chirag Prajapati
Chirag Prajapati

Reputation: 347

My solution is import SearchView as import android.widget.SearchView; if you import android.support.v7.widget.SearchView; so it can be the reason for the error.

Try this its work. Thanks.

Upvotes: 2

Related Questions