Back Button doesn't update/create a Crime. Issue with setCrimes(..) method


After reaching the final 2 steps of code update (p.286, Listing 14.21) I got stuck with a compilation error, since Android Studio says it cannot resolve setCrimes(crimes). I’ve went through all the recent changes in code several times, yet can’t figure out what could possibly cause this problem ?

As a result, pressing Back button doesn’t create/update a Crime in CrimeListFragment. This problem really doesn’t let me move on with the further code updates…((
@cstewart, could you please direct me to any parts of application, to what/where this setCrimes() method could relate. Maybe I’ve messed something up with relative objects to this function. Because previously (before DB updates) my app functionality was quite smooth.


I’m not sure what page this is on in your book, but in that chapter, we add a setCrimes method:


Hello! Thanks for responding
Yes, that’s the method.
I created setCrimes(…) as instructed in Adapter class, but the issue is in the updateUI(…) when we call this method: method is being highlighted in red (cannot be resolved), and at the same time in the method declaration (from your screenshot) it remains in grey (is never used). I hope i explained it clearly. Other than that my code in this file is identical to the one in the book.