How to clean project cache in Intellij idea like E

2019-01-07 08:10发布

Sometimes the IDE makes some error because of the cache. In Eclipse, we can use clean to solve the problem. But how can I do this in IntelliJ?

5条回答
Luminary・发光体
2楼-- · 2019-01-07 08:45

Try this:

Go into Settings (File > Settings or ctrl+alt+S). Under Project Settings, select the "Compiler" node. On the left, uncheck "Clear output directory on rebuild".

Note that this is a per project setting. If desired, change it in the project template settigs (Settings > Other Settings > Template Settings).

查看更多
淡お忘
3楼-- · 2019-01-07 08:47

In addition to the .Intellij* files, and invalidating the cache, if you really want to clear everything out, then also delete the .idea folder and *.iml per-project files that IntelliJ also generates...

查看更多
狗以群分
4楼-- · 2019-01-07 08:53

Maybe not THE answer, but it's definitely AN answer.

If nothing else is working for you, go the nuclear option: Close IDEA and delete the ".../.IntelliJIdea/system" directory using your local file system tools.

The .IntelliJIdea directory is usually found in your home directory. Your IDE configuration is in the ".../.IntelliJIdea/config" directory, so it should be fine.

Obviously, this is not the "IDEA" way to do it and would be completely unsupported by JetBrains. Also - I don't use Android Studio so I dunno if this will cause problems, but there you go.

It's worked for me before when I've had problems getting IDEA to start and nothing else works to get me going. Maybe back up your entire .IntelliJIdea directory if you have a morbid fear of losing all your work >.<

查看更多
何必那么认真
5楼-- · 2019-01-07 08:55

Click File -> Invalidate caches

As seen here

example

You can delete caches manually in home/.IntelliJIdeaXX/system. Read this for more info on cache locations.

查看更多
放我归山
6楼-- · 2019-01-07 08:58

Another solution was VCS -> Cleanup Project capture

查看更多
登录 后发表回答