idea创建sbt的scala项目遇到的坑

       最近在自学scala,scala默认用的不是maven用的是sbt所以就尝试在idea中尝试建立sbt的项目。最初遇到很多问题,下面是我发现的其中之一。

第一次尝试在新建项目的时候我选择了sbt和scala都不是我本机安装的版本,

结果就出现下面这样的错误:

[error] sbt.librarymanagement.ResolveException: Error downloading org.jetbrains:sbt-structure-extractor;sbtVersion=1.0;scalaVersion=2.12:2018.2

[error]  Not found

[error]  Not found

[error]  not found: /Users/yangchenglong/.ivy2/local/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2018.2/ivys/ivy.xml

[error]  not found: https://repo1.maven.org/maven2/org/jetbrains/sbt-structure-extractor_2.12_1.0/2018.2/sbt-structure-extractor-2018.2.pom

[error]  not found: https://repo.scala-sbt.org/scalasbt/maven-releases/org/jetbrains/sbt-structure-extractor_2.12_1.0/2018.2/sbt-structure-extractor-2018.2.pom

[error]  not found: https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/jetbrains/sbt-structure-extractor_2.12_1.0/2018.2/sbt-structure-extractor-2018.2.pom

[error]  not found: https://repo.typesafe.com/typesafe/ivy-releases/org.jetbrains/sbt-structure-extractor/2018.2/ivys/ivy.xml

[error]  not found: https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.jetbrains/sbt-structure-extractor/2018.2/ivys/ivy.xml

[error] Error downloading org.jetbrains:sbt-idea-shell;sbtVersion=1.0;scalaVersion=2.12:2017.2

在这里要提醒下,我们在新建项目的时候一定要先查看本地安装的sbt和scala版本可以通过sbt about查看:


在新建项目的时候选择上面的sbt和scala版本就不会出现各种奇怪的问题了。

你可能感兴趣的:(idea创建sbt的scala项目遇到的坑)