Reputation: 307
There were two power outages in less than 30 minutes while working with Android Studio 3.0.1. Ever since, the editor shows all Android classes in my project as Cannot resolve
, all packages as Unused import
s and, naturally, a thick red blob of errors at the right of every Java class in the project's package.
However, the project builds correctly, installs and runs on a physical device without issues, even after modifications to the source code.
The File -> Settings -> ... Android SDK
is in place:
Tried
Clean Project
Rebuild Project
Surely, some setting I am unable to figure out has gone haywire. Many thanks in advance.
Upvotes: 1
Views: 281
Reputation: 1161
The following works for me in such situations: Go to
"File" -> "Invalidate Caches..." and select "Invalidate and Restart"
. Hope that helps.
Upvotes: 2