1
我正在嘗試在SBT構建文件中添加mockito依賴項,但它給出了未解決的依賴項異常。ScalaTest和Mockito - 無法解析的依賴關係
我不確定它是否與Scala和Mockito版本有關。
scalaVersion := "2.11.8"
libraryDependencies ++= Seq("org.scalatest" % "scalatest_2.11" % "2.2.2" % "test",
"org.mockito" % "mockito-all" % "1.9.5" % "test")
例外:
trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.mockito#mockito-all;1.9.5: not found
[error] (*:update) sbt.ResolveException: unresolved dependency: org.mockito#mockito-all;1.9.5: not found
[error] Total time: 23 s, completed Oct 12, 2017 3:13:16 PM
我與不同版本的Mockito 1.8.5嘗試爲好。但沒有運氣。
在此先感謝。
我確實已將依賴項版本更改爲上述內容。但我仍面臨同樣的問題。 –
您是否對代理和網絡配置有任何問題?你能夠獲得文件夾的列表https://repo1.maven.org/maven2/org/mockito/mockito-core/2.8.47/? –
不,我沒有看到爲mockito創建的任何文件夾。我也嘗試過不同的mockito版本,但是它的失敗與相同的錯誤信息。 –