Intellij错误:内部缓存已损坏或格式已过时 [英] Intellij Error: Internal caches are corrupted or have outdated format
问题描述
在Intellij中构建Java项目时,间歇性地出现错误。
内部缓存已损坏或格式已过时,从而迫使重建项目:java.io。 FileNotFoundException:C:\target\classes\ehcache.xml(访问被拒绝)
我已经运行了File-> Invalidate caches。我已经重新启动Intellij并杀死了所有Java进程。最终,我再次使它重新构建,但是不确定我尝试用什么方法来解决问题。
当我尝试访问 Target文件夹时,它说访问被拒绝。 / p>
有人见过吗?
如我的评论所述,我收到了同样的消息,但没有涉及任何访问权限问题。
这似乎在IDEA的使用上有些混乱。我可以通过删除 C:\Users\%USERNAME%\.IdeaIC13 $ c $中的
system
目录来解决此问题。 c>(路径显然取决于IntelliJ IDEA版本)。
这将存储所有缓存和索引以及其他内容。我不得不承认,我不能确切地说出为什么这会有所帮助,但这似乎是使缓存无效的一种较粗略的方法,并且它可以工作。您的项目历史记录不会以这种方式删除,因此您实际上可以继续工作-只需重新扫描所有文件并且必须重建所有索引即可。
事件,这根本不是一个访问权限问题。
I am getting an error intermittently when I build my Java project in Intellij.
Internal caches are corrupted or have outdated format, forcing project rebuild: java.io.FileNotFoundException: C:\target\classes\ehcache.xml (Access is denied)
I have run File->Invalidate caches. I have restarted Intellij and killed all Java processes. I eventually get it to build again but not sure what thing I try does the trick.
When I try to access the 'Target' folder, it says Access Denied.
Anyone seen this before?
As mentioned in my comment, I received the same message, but without any access right issues involved whatsoever.
It seemed to be some kind of confusion on IDEA's end. I was able to fix this by deleting the system
directory in C:\Users\%USERNAME%\.IdeaIC13
(the path obviously depends on the IntelliJ IDEA version).
This stores all caches and indices among other things. I have to confess that I can't tell why exactly this helps, but it seems to be a rougher way to "invalidate caches" and it works. Your project history is not deleted this way, so you can practically continue working - just that all files have to be scanned again and all indices have to be rebuilt.
In any event, this was not an access rights problem at all.
这篇关于Intellij错误:内部缓存已损坏或格式已过时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!