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 that library module doesn't work.
I already tried various options like 1) Invalidate cache/restart 2) deleted build directory 3) clean and rebuild but nothing seems to be working.
Interestingly, when Android Studio is rebuilding indexes after invalidate/restart, it momentarily shows that library references in while but then again in red.
I tried
Invalidate cache/restart
orclean Project -> rebuild project
. These didn't work for me.The final solution was open Project window on the left side of IDE, under Project mode, delete
.gradle
and.idea
folder, then sync, it works.In my case changing the Gradle version worked.
In gradle-wrapper.properties
changing
to
and in build.gradle (project level)
changing
to
This has happened to me a couple of times, there are a few ways you can resolve this problem;
Following has resolved this for me.