当文件更改后播放重新启动时,我偶尔会收到此错误:
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]
这只会偶尔发生,并且总是通过重新启动IntelliJ来解决。为什么会发生这种情况,我该如何解决?
我正在通过IntelliJ运行Play,我正在使用IntelliJ 14.1.2,Scala 2.11.6和Play 2.3.8。
尝试通过无效的Intellij IDEA缓存
文件 - >使高速缓存/重新启动无效
它需要5分钟,但对我来说是诀窍。
正如以西结·维克托在评论中提到的那样:
刚刚重启Intellij为我解决了问题。
与使Intellij IDEA缓存无效相比,这可以节省相当多的时间。