Hello I hope you can help me .. I have a bd in firebase I want to list what contains companies but it shows me this error
This is my code to obtain the data
FirebaseDatabase database = FirebaseDatabase.getInstance();
DatabaseReference empresaRef = database.getReference(FirebaseReference.EMPRESAS_REFERENCE);
empresaRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
ArrayList<String> listtadoEmpresa = new ArrayList<>();
for(DataSnapshot nodo : dataSnapshot.getChildren()) {
Empresa empresa= nodo.getValue(Empresa.class);
String nombre = empresa.getNombre();
listtadoEmpresa.add(nombre);
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
Log.e("ERROR ", databaseError.getMessage());
}
});
and this is the firebase bd