重新启动Play时引导异常

Kev*_*cht 26 scala intellij-idea playframework-2.0

当文件更改后播放重新启动时,我偶尔会收到此错误:

play.PlayExceptions$UnexpectedException: Unexpected exception[BootException: Cannot redefine component.  ID: compiler-interface-bin_2.11.6__52.0, files: /Users/kevin/.ivy2/cache/org.scala-sbt/compiler-interface-bin_2.11.6__52.0/jars/compiler-interface-bin_2.11.6__52.0-0.13.5_20140527T130009.jar]
at play.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:51) ~[na:na]
at play.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:44) ~[na:na]
at scala.Option.map(Option.scala:145) ~[scala-library-2.11.6.jar:na]
at play.PlayReload$.taskFailureHandler(PlayReload.scala:44) ~[na:na]
at play.PlayReload$.compileFailure(PlayReload.scala:40) ~[na:na]
Run Code Online (Sandbox Code Playgroud)

这只会偶尔发生,并且总是通过重新启动IntelliJ来解决.为什么会发生这种情况,我该如何解决?

我正在通过IntelliJ运行Play,我正在使用IntelliJ 14.1.2,Scala 2.11.6和Play 2.3.8.

Joe*_*Joe 45

尝试通过无效的Intellij IDEA缓存

File - > Invalidate Caches/Restart

它需要5分钟,但对我来说是诀窍.

  • 我刚刚执行了重启,它解决了问题; 只需重启比无效+重启FWIW快得多. (5认同)

pme*_*pme 6

正如以西结维克多在他的评论中提到的:

只需重新启动 Intellij 即可为我解决问题。

与使 Intellij IDEA 缓存失效相比,这为您节省了相当多的时间。