IDEA-2017.2-bug-SBT项目初始化的失败

alt

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

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

原错误信息

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

[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

Bug解决方法

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

alt

参考

IDEA官方社区的帖子

alt


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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值