我正在尝试使用 Scala 设置 API,并发现一些在线资源建议akka
。我是 Scala 的新手,所以我正在关注一些文档,还查看了https://doc.akka.io/docs/akka/current/typed/actors.html以获取官方文档和版本。我已经在 build.sbt 中进行了该设置,其余库依赖项如下:
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
)
当我尝试运行 sbt run 时出现错误sbt.librarymanagement.ResolveException: Error downloading com.typesafe.akka:akka-actor-typed_3:2.9.7
。我已验证软件包和版本在此处存在: https: //doc.akka.io/docs/akka/current/typed/actors.html。我想知道我的设置或配置是否有误。
任何关于如何解决此问题的帮助都将不胜感激!完整的错误日志如下,供参考:
Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.akka:akka-actor-typed_3:2.9.7
[error] Not found
[error] Not found
[error] not found: /Users/env/.ivy2/localcom.typesafe.akka/akka-actor-typed_3/2.9.7/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_3/2.9.7/akka-actor-typed_3-2.9.7.pom
[error] at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:346)
[error] at lmcoursier.CoursierDependencyResolution.$anonfun$update$39(CoursierDependencyResolution.scala:315)
[error] at scala.util.Either$LeftProjection.map(Either.scala:573)
[error] at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:315)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:60)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:142)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:74)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:144)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:131)
[error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:169)
[error] at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3894)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[error] at java.base/java.lang.Thread.run(Thread.java:1575)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.akka:akka-actor-typed_3:2.9.7
[error] Not found
[error] Not found
[error] not found: /Users/env/.ivy2/localcom.typesafe.akka/akka-actor-typed_3/2.9.7/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_3/2.9.7/akka-actor-typed_3-2.9.7.pom
[error] Total time: 1 s, completed Oct 23, 2024, 3:02:16 p.m.
正如Akka - Actors 简介中详细介绍的那样(与您分享的链接相同)
根据
build.sbt
您分享的配置,缺少该行