? ? ? ?最近在自學scala,scala默認用的不是maven用的是sbt所以就嘗試在idea中嘗試建立sbt的項目逆济。最初遇到很多問題酌予,下面是我發(fā)現(xiàn)的其中之一。
第一次嘗試在新建項目的時候我選擇了sbt和scala都不是我本機安裝的版本奖慌,
結果就出現(xiàn)下面這樣的錯誤:
[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版本就不會出現(xiàn)各種奇怪的問題了。