I know this has been asked a lot,but i'm really sorry,i am a noob in this,i'll just attach the code,here
l =adminUserlst.split(","); UsrList = new ArrayList<String>(); for(i=0;i<=l.length-1;i++){ DatabaseReference db33 =firebaseDatabase.getReference("USERS/"); db33.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { ***String spl=dataSnapshot.child(l[i]).child("sList").getValue().toString();//.split(","); splits =spl.split(","); for(ii=0;ii<=splits.length-1;ii++){ UsrList.clear(); UsrList.add(splits[ii]); usrAdapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_spinner_dropdown_item, UsrList); spinner.setAdapter(usrAdapter); } } @Override public void onCancelled(DatabaseError databaseError) { } }); } I have some references in l,by which i want to extract some data from firebase database,so once i split the data,i'm using the split data present as a child node to get some more information,but for some reason i'm getting a ArrayIndexOutofBounds:length=1;index=1 at ***
Any help would be appreciated