我相当初级,所以我很乐意接受一些帮助来解决这个问题...
我正在使用IntelliJ IDEA 2018.2.5 Sbt版本:1.2.6 JDK版本:1.8.0_191-b12 Scala被用作IntelliJ插件(最新)。
当我使用InteliJ加载从Coursera网页下载的sbt项目时,该项目未同步,并且看到很多错误消息。同样在build.sbt中,行也是红色的。我已经复制了错误消息和build.sbt的行。
这是错误消息。由于链接的最大限制,列表不完整:
导入sbt项目时出错:
;reload; set root.org.jetbrains.sbt.StructureKeys.sbtStructureOptions in
Global := "download resolveClassifiers resolveSbtClassifiers"
;/:dumpStructureTo C:/Users/KOMPOS~1/AppData/Local/Temp/sbt-structure2.xml;
session clear-all [info] Loading global plugins from C:\Users\Komposzt
f┼Ĺkapit├Ăny.sbt\0.13\plugins [info] Loading project definition from
C:\Users\Komposzt f┼Ĺkapit├Ăny\Desktop\example 1\project [info] Set
current project to progfun1-example (in build
file:/C:/Users/Komposzt%20f%C5%91kapit%C3%A1ny/Desktop/example%201/) [info]
Defining /:sbtStructureOptions
[info] The new value will be used by /:ssOptions
[info] Reapplying settings...
[info] Set current project to progfun1-example (in build
file:/C:/Users/Komposzt%20f%C5%91kapit%C3%A1ny/Desktop/example%201/)
Downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-
parser-combinators_2.12/1.1.1/scala-parser-combinators_2.12-1.1.1.pom.sha1
Downloading https://repo1.maven.org/maven2/junit/junit/4.12/junit-
4.12.pom.sha1
Downloading https://repo1.maven.org/maven2/org/scalatest/scalatest_2.12/2.2.6/scalatest_2.12-2.2.6.pom
Downloading https://repo1.maven.org/maven2/org/scala-lang/scala-
library/2.12.7/scala-library-2.12.7.pom.sha1
Downloading https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.pom
Downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-
parser-combinators_2.12/1.1.1/scala-parser-combinators_2.12-1.1.1.pom
Downloading https://repo1.maven.org/maven2/org/scalatest/scalatest_2.12/2.2.6/scalatest_2.12-2.2.6.pom.sha1
Downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.7/scala-ibrary-2.12.7.pom
[trace] Stack trace suppressed: run last *:ssExtractDependencies for the
full output. [trace] Stack trace suppressed: run last
*:coursierSbtClassifiersResolution for the full output.
[trace] Stack trace suppressed: run last :coursierResolutions for the full
output.
[error] (:ssExtractDependencies) coursier.ResolutionException: Exception
during resolution
[error] (:coursierSbtClassifiersResolution) coursier.ResolutionException:
Exception during resolution
[error] (:coursierResolutions) coursier.ResolutionException: Exception
during resolution
[error] Total time: 2 s, completed 2018.10.22. 13:08:00
build.sbt内容:
name := course.value + "-" + assignment.value
scalaVersion := "2.12.7"
libraryDependencies += "org.scalatest" %% "scalatest_2.11" % "3.0.5" %
"test"
scalacOptions ++= Seq("-deprecation")
// grading libraries libraryDependencies += "junit" % "junit" % "4.12" %
Test
// for funsets libraryDependencies += "org.scala-lang.modules" %% "scala-
parser-combinators" % "1.1.1"
// include the common dir commonSourcePackages += "common"
courseId := "bRPXgjY9EeW6RApRXdjJPw"