The array of players is populated with data but gives error in method setadapter
.
Spinner spinnerJogador1;
ArrayList<JogadorModel> jogadores = jogadorRepository.SelecionarDisponiveis();
dataAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, jogadores);
// Drop down layout style - list view with radio button
dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
// attaching data adapter to spinner
spinnerJogador1.setAdapter(dataAdapter);