posted 6 years ago
Good evening everyone,
Right now, I just want to add an element to an recyclerView adapter, but when I add the second item, the logcat on Android Studio shows the following exception:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.add(ArrayList.java:457)
at com.switchswan.FirebaseRecyclerAdapter$1.onChildAdded(FirebaseRecyclerAdapter.java:101)
The code adds the items to Firebase with no problems, but it appears that the recyclerView cannot reflect what is in the Firebase Database.
Screenshot-from-2018-01-13-21-48-55.png