This answer works for both IntelliJ & AndroidStudio
If you cannot even open your project in IntelliJ[AndroidStudio]:
- Close IntelliJ[AndroidStudio]
-
Go to the directory <your_home>/.IntelliJIdeaXX[.AndroidStudioXX]/system/cache
WHERE
-
<your_home> is
- Windows Users:
C:\Users\<**Your User**>\(or%USERPROFILE%) - Linux Users(Ubuntu), Mac:
~/
- Windows Users:
-
XX is your IntelliJ version (This directory is “caches” in some versions.)
-
- Remove all the files in the cache directory.
- Then restart IntelliJ[AndroidStudio]
This has worked for me in the past.