如何在Scala 3中使用akka?我在使用Scala 3时找不到akka依赖项
sbt错误:
[error] not found: /Users/admin/.ivy2/localcom.typesafe.akka/akka-actor-typed_3/2.6.15/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_3/2.6.15/akka-actor-typed_3-2.6.15.pom
[error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.akka:akka-actor-typed_3:2.6.15
[error] Not found
[error] Not found
[error] not found: /Users/admin/.ivy2/localcom.typesafe.akka/akka-actor-typed_3/2.6.15/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_3/2.6.15/akka-actor-typed_3-2.6.15.pom
2条答案
按热度按时间0ve6wy6x1#
akka-actor-typed
是针对Scala 2.12、2.13发布的,而不是针对Scala 3发布的https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor-typed
尝试兼容模式
https://docs.scala-lang.org/scala3/guides/migration/compatibility-classpath.html
更新。
akka-actor-typed
自Scala 3 2.6.17版本起发布x7rlezfr2#
为了在Scala 3中使用akka,例如
akka-actor-typed
,您可以将akka-actor-typed 2.6.18作为依赖项包含在内。提供的示例使用akka-actor-typed 2.6.15,其目标是scala 2.13和2.12。
Scala 3仅在akka-actor-typed 2.6.17之后作为目标包含。
akka-actor-typed
的最新版本是akka-actor-typed 2.6.18,其中scala 3作为一个目标。