如何在 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
akka-actor-typed
是针对 Scala 2.12、2.13 发布的,不适用于 Scala 3
https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor-typed
尝试兼容模式
lazy val foo = project.in(file("foo"))
.settings(
scalaVersion := "3.0.0",
libraryDependencies +=
("com.typesafe.akka" %% "akka-actor-typed" % "2.6.15")
.cross(CrossVersion.for3Use2_13)
)
https://docs.scala-lang.org/scala3/guides/migration/compatibility-classpath.html
Update. akka-actor-typed
自 2.6.17 版本起针对 Scala 3 发布
libraryDependencies += "com.typesafe.akka" %% "akka-actor-typed" % "2.6.17"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)