IntelliJ无法导入sbt项目 [英] IntelliJ Cannot Import sbt Project

查看:428
本文介绍了IntelliJ无法导入sbt项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将IntelliJ从CE 2017.2.5升级到CE 2017.3版本,现在无法构建sbt项目.构建陷入第一步:

I have upgraded IntelliJ to version CE 2017.3 from a CE 2017.2.5, and now I cannot build my sbt project. The build gets stuck on the first step:

"Build: sync
  MyProjName: syncing...
   dump project structure from sbt"

我已经删除了.idea目录和MyProjName/project/target目录.我从命令行进行了sbt构建,此方法有效. 然后,我再次启动IntelliJ,并尝试将MyProjName/build.sbt导入为项目.我也已经注销/登录.做了几次.导入永远不会超过此步骤.

I have deleted the .idea directory and the the MyProjName/project/target directory. I did an sbt build from the command line, which worked. Then I started IntelliJ again and tried to import MyProjName/build.sbt as a project. I have also logged out/in. Did this several times. The import never progresses past this step.

我在防火墙后面工作,但是我检查了我的代理设置,这些设置正确且与以前的版本相同(如果需要的话).

I work behind a firewall, but I have checked my proxy settings, and they are correct and unchanged from the previous version (if this matters).

我该如何解决/解决此问题?

How can I troubleshoot / fix this?

sbt版本为0.13.6. Scala插件2017.3.10.

The sbt version is 0.13.6. Scala plugin 2017.3.10.

从日志中:

IDE: IntelliJ IDEA (build #IC-173.3727.127, 27 Nov 2017 09:32)
OS: Windows 7 (6.1, amd64) 
JRE: 1.8.0_152-release-1024-b6 (JetBrains s.r.o) 
JVM: 25.152-b6 (OpenJDK 64-Bit Server VM) 

推荐答案

我在以下信息中解决了同步问题: https://youtrack.jetbrains.com/issue/SCL-13024

I solved the sync issue following info here: https://youtrack.jetbrains.com/issue/SCL-13024

关键信息是看来sbt试图为根本不可用的sbt插件重新解析'sources'和'docs'.如果禁用了用于下载"Library Sources"和"sbt sources"的属性,然后将结构的转储时间从永久"减少到不到1分钟."

Key info is "It seems that sbt is trying to re-resolve 'sources' and 'docs' for sbt plugins that are not available at all. If properties to download "Library sources" and "sbt sources" are disabled, then time to dump the structure is reduced from 'forever' to less than 1 minute."

也就是说,在IntelliJ IDEA中,清除IDEA首选项中Build Tools sbt的项目级别设置"下的库源"复选框.如下图所示:

That is , in IntelliJ IDEA, clear the check box "Library sources" under "Project level settings" for Build Tools sbt in IDEA preferences. As shown in image below:

这篇关于IntelliJ无法导入sbt项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆