I have the error when I initialize the list view findViewById(R.id.listview)
error: incompatible types: no unique maximal instance exists for type variable T with upper bounds ListView,View where T is a type-variable: T extends View declared in method findViewById(int)
public class ListView extends AppCompatActivity {
ListView listview;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_view);
listview = findViewById(R.id.listview);
}
}