Interesting. I used the build.gradle from the repo in my tutorial code and …. exactly the same problem.
So it is not the build.gradle file that is causing the problem.
Perhaps when you are updating the tutorial, it may be useful to follow the tutorial again just to see that it still works at the various stages, rather than just at the end.
Also tagging each stage would be useful so that it can be checked out at that stage.