IntelliJ IDEA 使用总结

1、在工程src目录下新建Java包,结果出来的不是包,而是个普通文件夹,里面的Java文件都不能运行。

原因是该工程下的src目录在别的地方被“Attach Sources……”。所以不能在该src目录下新建Java包。

解决办法:选中该src目录,将其“Detach”就可以了。改完之后,再“Attach Sources……”。

 

2、在修改某Class后,引起其他class出错,有时候改完了我也不知道其他类出错了。IDEA又没有自动提示。

原因是出错的该Class文件,引用的另一个Class还是旧版本的,所以出错了。

解决办法:更新引用Class所在的Jar包,即可。

 

3、Error: Read from storage 0 bytes, but requested 12 bytes

解决办法:删除\IdeaConfig\.IntelliJIdea90\system\compiler目录下,对应工程的文件夹,即可。

参考:http://youtrack.jetbrains.net/issue/IDEA-25918?query=Error:+Read+from+storage+0+bytes,+but+requested+12+bytes

 

Using File -> Invalidate Caches did not help for me. The problem did not go away for me until I had manually deleted the "compiler cache" found under /Users/<user>/Library/Caches/IntelliJIdea90/compiler. My environment is Mac + Leopard + Java 1.5. But I never tried a Rebuild though....

 

posted @ 2010-01-29 18:41  hellofei  阅读(1181)  评论(0编辑  收藏  举报