这个错误出现过若干次了,每次出现都想记录一下可是都忘了,然后下一次再遇见就又要搞很久才能解决,其实这本身是IntelliJ IDEA 2017.2的一个bug,只要修改一处配置就好了。

注:先前的文章里记得有个地方对这个问题表述的不正确,有时间再改。

原错误信息

原错误出现的IDEA版本:2017.2;
原错误的出现场景:每次新建SBT项目并添加完SBT依赖之后出现;
原错误的表现:build.sbt文件内容解析全部是红的,并且sbt shell报错;
原错误报错如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from C:\Users\msi\.sbt\1.0\plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from I:\IDEA_PROJ\Visualization\project
[info] Loading settings from build.sbt ...
[info] Set current project to Visualization (in build file:/I:/IDEA_PROJ/Visualization/)
[info] sbt server started at local:sbt-server-a45abbca777ea4158128
sbt:Visualization>
[info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile, shellPrompt
[info] The new values will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to Visualization (in build file:/I:/IDEA_PROJ/Visualization/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from C:/Users/msi/.IntelliJIdea2017.2/config/plugins/Scala/launcher/sbt-structure-1.1.jar
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
... ... ...
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down server
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0

<< 更多精彩尽在『程序萌部落』>>
<< https://www.cxmoe.com >>

Bug解决方法

File->Setting->Build Tools->SBT,勾选Use SBT Shell for ...

参考

IDEA官方社区的帖子



😒 留下您对该文章的评价 😄



 评论




全站共计 313.7k 字,自豪地使用 Volantis 主题

博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议