I closed my laptop (with android studio running) to hibernate it only to find it fully shutdown later when I arrived home. And now Android Studio completely broke. I found one java file corrupted which isn't that big of a deal, I can rewrite it. But now I'm getting the "Cannot resolve symbol 'xxx'" for EVERYTHING in a project. I'm getting the error for all imports, even native Android/Java libraries. It does this for all my projects, a simple gradls sync or project rebuild didn't do anything. I'm clueless on what to do to fix this issue. http://puu.sh/c3eMs/30fcdd99a7.png
Now looking at the screenshot, workspace.xml (of the project which was opened at the time of the shutdown) also got corrupted and unfortunatelly I don't have a backup of it. Not even the github repository have it for some reason.
Any help would be greatly appreaciated to get android sudio working again. Reinstalling it would be my very last resort.
From the screenshot, it looks like you are storing the project in Dropbox. This isn't recommended.
Try this:
After making a backup copy of the project, copy the project to another location on your hard drive. Then clear the cache and Restart Android Studio using File -> Invalidate Caches / Restart. This will give Android Studio a chance to re-index the project. Hope that helps.
I have Solved my problem using steps :
File->Invalidate Caches/Restart.
Invalidate and Restart.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With