Recently I updated my Android Studio to 3.1.3 version and a strange issue occured.

When I opened a random class in one project, there're a lot of red text indicating that the used classes are not imported.

After trying numerous actions like clearing the project, restarting the Android Studio, invalidating the caches and restarts... Nothing worked out.

Then I opened the Terminal and deleted the .idea/libraries directory and restarted the IDE.

After the restart, everything was importing and working as expected.

I hope that I would help someone with the same strange issue.

Happy coding! 👨‍💻