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

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

问题描述

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

"构建:同步MyProjName:正在同步...从 sbt 转储项目结构"

我已删除 .idea 目录和 MyProjName/project/target 目录.我从命令行做了一个 sbt 构建,它有效.然后我再次启动 IntelliJ 并尝试将 MyProjName/build.sbt 作为项目导入.我也登出/登入.这样做了几次.导入永远不会超过这一步.

我在防火墙后面工作,但我检查了我的代理设置,它们是正确的,与以前的版本相比没有变化(如果这很重要的话).

我该如何解决/解决这个问题?

sbt 版本是 0.13.6.Scala 插件 2017.3.10.

来自日志:

IDE:IntelliJ IDEA(build #IC-173.3727.127,2017 年 11 月 27 日 09:32)操作系统:Windows 7(6.1,amd64)JRE:1.8.0_152-release-1024-b6(JetBrains s.r.o)JVM:25.152-b6(OpenJDK 64 位服务器虚拟机)

解决方案

我在这里解决了同步问题:

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"

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?

The sbt version is 0.13.6. Scala plugin 2017.3.10.

From the log:

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) 

解决方案

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

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."

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天全站免登陆