【问题标题】:SBT <project name> project refresh failedSBT <项目名称> 项目刷新失败
【发布时间】:2018-07-12 15:34:08
【问题描述】:

每当我尝试在 IntelliJ 中启用自动导入时,它总是给我这个错误:

SBT 'mobile-aggregator' 项目刷新失败

错误:导入 SBT 项目时出错:[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:107)
[错误] 在 sbt.io.Using.apply(Using.scala:22)
[错误] 在 sbt.MainLoop$.runWithNewLog(MainLoop.scala:101)
[错误] 在 sbt.MainLoop$.runAndClearLast(MainLoop.scala:57)
[错误] 在 sbt.MainLoop$.runLoggedLoop(MainLoop.scala:42)
[错误] 在 sbt.MainLoop$.runLogged(MainLoop.scala:34)
[错误] 在 sbt.StandardMain$.runManaged(Main.scala:113)
[错误] 在 sbt.xMain.run(Main.scala:76)
[错误] 在 xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[错误] 在 xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[错误] 在 xsbt.boot.Launch$.run(Launch.scala:109)
[错误] 在 xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[错误] 在 xsbt.boot.Launch$.launch(Launch.scala:117)
[错误] 在 xsbt.boot.Launch$.apply(Launch.scala:18)
[错误] 在 xsbt.boot.Boot$.runImpl(Boot.scala:41)
[错误] 在 xsbt.boot.Boot$.main(Boot.scala:17)
[错误] 在 xsbt.boot.Boot.main(Boot.scala)
[错误] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[错误] 对完整日志使用“最后一个”。
[信息] 关闭服务器
查看完整登录 href="file:/C:/Users/Rahman/.IdeaIC2017.2/system/log/sbt.last.log">file:/C:/Users/拉赫曼/.IdeaIC2017.2/system/log/sbt.last.log

【问题讨论】:

  • 是否可以使用较新的 IDEA 和 Scala 插件版本(2017.3.3 或 2017.3.4)检查问题?
  • 由于组织限制,我只想继续做这些版本。

标签: java scala intellij-idea playframework sbt


【解决方案1】:

当您的编译器/编辑器尝试使用缓存的项目数据时,这种情况会发生很多次。 要解决此问题,请执行以下步骤:

  1. 退出 IntelliJ 并从 root project folder 中删除 .idea 文件夹
  2. root_project_folder\target & root_project_folder\project\target 中删除目标文件夹
  3. 确保您在build.sbt 中有一个有效的项目名称。它应该采用以下格式:name := "projectname"
  4. 再次启动您的智能并重新初始化您的项目。

希望这应该可以解决您的问题

【讨论】:

    猜你喜欢
    • 2017-03-22
    • 1970-01-01
    • 2017-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多