Android Studio suddenly cannot resolve symbols
None of the things mentioned earlier here did actually work for me. But then I found this menu entry in the file menu Invalidate Caches/Restart
which appears to have fixed the problem.
I don't really know what happened in the background but when Android Studio started up again the status bar said Indexing...
for a minute or so which apparently did wonders.
For reference I'm using Android Studio 0.5.4.
Go through the link and it worked for me.
1.) Choose File option from menu on left top side of android studio.
2.) Select the option : "Invalidate Cache/ Restart.." It will open an dialog.
3.) Click on the first button with option : "Invalidate and Restart"
4.) It will close the studio and restart it. Start indexing of the project.
It resolved my problem:
File -> Invalidate Cache/ Restart -> Invalidate and Restart
Source: https://www.youtube.com/watch?v=FX_gCTpqhwM
You've already gone down the list of most things that would be helpful, but you could try:
- Exit Android Studio
- Back up your project
- Delete all the .iml files and the .idea folder
- Relaunch Android Studio and reimport your project
By the way, the error messages you see in the Project Structure dialog are bogus for the most part.
UPDATE:
Android Studio 0.4.3 is available in the canary update channel, and should hopefully solve most of these issues. There may be some lingering problems; if you see them in 0.4.3, let us know, and try to give us a reliable set of steps to reproduce so we can ensure we've taken care of all code paths.