我在 Intellij 中刷新 SBT 项目时遇到问题。而且我不是唯一一个。
这是 sbt 控制台:
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=localhost:51917,suspend=n,server=y -Xdebug -server -Xmx1028M -Dfile.encoding=UTF-8 -Didea.runid=2017.2 -Didea.managed=true -jar "/Users/pascal.mengelt/Library/Application Support/IntelliJIdea2018.1/Scala/launcher/sbt-launch.jar" idea-shell
Listening for transport dt_socket at address: 51917
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/user/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/pascal.mengelt/GitHub/scala/scala-adapters-wizard/project
[info] Loading settings from build.sbt ...
[info] Set current project to wizardDemo (in build file:/Users/pascal.mengelt/GitHub/scala/scala-adapters-wizard/)
[error] Not a valid command: idea-shell (similar: shell, oldshell)
[error] Not a valid project ID: idea-shell
[error] Expected ':'
[error] Not a valid key: idea-shell (similar: daemonShell)
[error] idea-shell
[error] ^
[INFO] [04/13/2018 13:13:19.377] [Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
我发现了 Intellij 问题(有解决方法):
是的,删除
~/.sbt/{0.13|1.0}/plugins/target
这里是 Mateusz Kubuszok 提供的命令:
rm -rf ~/.sbt/{0.13,1.0}/plugins/target
工作,当我创建空插件目录时:
$ mkdir -p ~/.sbt/1.0/plugins
之后我打开 sbt shell
$ ls ~/.sbt/1.0/plugins
项目目标