【问题标题】:com.typesafe.scala-logging#scala-logging-slf4j_2.12;2.1.2: not foundcom.typesafe.scala-logging#scala-logging-slf4j_2.12;2.1.2:未找到
【发布时间】:2020-08-12 21:46:18
【问题描述】:

为什么我会收到这些UNRESOLVED DEPENDENCIES 错误

我的 build.sbt 有以下内容:

libraryDependencies ++= Seq(
....
"com.typesafe.scala-logging" %% "scala-logging-slf4j" % "2.1.2"
)

我也试过

libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging-slf4j" % "2.1.2"

看看这是否会有所作为。 %%% 在组 ID 之后。我尝试了有和没有

resolvers += "slf4j repo" at "https://mvnrepository.com/artifact/com.typesafe.scala-logging/scala-logging-slf4j",

我错过了什么,我做错了什么?请帮忙!

【问题讨论】:

  • 显然问题是这个库不适用于我的 Scala 版本:(
  • 如果你想更新到我认为更新版本的 Scala,你有什么理由要使用已经过时 6 年的库吗?
  • 没有理由,我只是不知道它已经过时了。我对 Scala 很陌生。试图模仿其他项目正在做的事情。

标签: scala dependencies sbt


【解决方案1】:

有一段时间,scala-logging 假设您总是想使用slf4j - 所以只需删除该依赖项并仅获取

libraryDependencies += "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2"

它适用于 Scala 2.11、2.12 和 2.13

【讨论】:

    猜你喜欢
    • 2011-11-19
    • 2019-09-10
    • 2015-05-17
    • 2020-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-06
    相关资源
    最近更新 更多