type parameter t has incompatible upper bounds view and gridview

0

I'm having a strange problem, in my class:

import android.os.Bundle;

import android.support.v7.app.AppCompatActivity;

import java.util.ArrayList;

public class GridView extends AppCompatActivity {

private GridView gridView;
private GridAdapter adapter;

@Override
protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.grid_cuidados);

    ArrayList<String> arrayList = new ArrayList<>();
    arrayList.add("Paola");
    arrayList.add("Rodrigo");
    arrayList.add("Hernan");
    arrayList.add("Stefi");
    arrayList.add("Pablo");

    gridView = findViewById(R.id.gvElegir);
    adapter = new GridAdapter(this,arrayList);
}

}

I marked this line in red and it gives me the error of the title:

  

gridView = findViewById (R.id.gvSelect);

Did something similar happen to someone? How did they solve it?

Thank you very much!

    
asked by Rodrigo 18.11.2018 в 22:06
source

0 answers