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?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
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).
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...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 >.<
Click File -> Invalidate caches
As seen here
You can delete caches manually in
home/.IntelliJIdeaXX/system
. Read this for more info on cache locations.Another solution was VCS -> Cleanup Project capture