Error: no suitable method found for setAdapter?

Good evening when you compile the application errors out what am I doing wrong?

java:1226: error: no suitable method found for setAdapter(Object)
listView.setAdapter(reactorsAdapter);
^
 method AdapterView.setAdapter(ListAdapter) is not applicable
 (argument mismatch; Object cannot be converted to ListAdapter)
 method AbsListView.setAdapter(ListAdapter) is not applicable
 (argument mismatch; Object cannot be converted to ListAdapter)
 method ListView.setAdapter(ListAdapter) is not applicable
 (argument mismatch; Object cannot be converted to ListAdapter)
com\procrea8\mabtribune\modules\feed\adapter\FeedAdapter.java:1232: error: cannot find symbol
 reactorsAdapter.addAll(((ReactResponse) response.body()).getMembers());


Java code

public void showReactorsDialog(int i) {
 FeedResponse feedResponse = (FeedResponse) this.feedLists.get(i);
 Builder builder = new Builder(this.context);
 View inflate = this.layoutInflater.inflate(R. layout.reactors_dialog, null);
builder.setView(inflate);
 builder.setTitle((CharSequence) "People who react to this");
 ListView listView = (ListView) inflate.findViewById(R. id.reactorLists);
 final Object reactorsAdapter = new ReactorsAdapter(this.context, new ArrayList());
 Line 226 >>>> listView.setAdapter(reactorsAdapter);
 ((LikeApiInterface) Api.getRetrofit().create(LikeApiInterface.class)).getReacts("feed", feedResponse.getFeedId(), "50").enqueue(new Callback<reactresponse>() {
 public void onFailure(Call<reactresponse> call, Throwable th) {
 }</reactresponse></reactresponse>

and 1232

public void onResponse(Call<reactresponse> call retrofit2.Response<reactresponse> response) {
 reactorsAdapter.addAll(((ReactResponse) response.body()).getMembers());
}
});
builder.create().show();
 }</reactresponse></reactresponse>
June 7th 19 at 14:55
1 answer
June 7th 19 at 14:57
Solution
final Object reactorsAdapter = new ReactorsAdapter

Teach Java. Here you declare that reactorsAdapter is an Object. Must be ReactorsAdapter reactorsAdapter = ...
where can you learn Java? - Albertha.Lakin commented on June 7th 19 at 15:00
www.oracle.com/technetwork/java/index.html - Anabelle_Hettinger commented on June 7th 19 at 15:03

Find more questions by tags AndroidJava