The project compiles fine. However, Android studio 3.0.1 shows reference to one particular library in red and displays \"cannot resolve symbol\". Even single stepping into
For me problem was that AS suggested I upgrade gradle version, (from 3.5 to 4.4), and then it started doing it.
Solution was to delete the 3.5 folder from .gradle in project