我想导入这个。build.sbt文件的内容
name := "abdesante"
version := "0.1"
scalaVersion := "2.13.3"
libraryDependencies += "com.bot4s" %% "telegram-core" % "4.4.0-RC2"
这是 sbt 的输出:
[info] welcome to sbt 1.3.13 (Oracle Corporation Java 11.0.1)
[info] loading project definition from /Users/islamshaykhiev/Workspace/bots/telegram/abdesante/project
[info] loading settings for project abdesante from build.sbt ...
[info] set current project to abdesante (in build file:/Users/islamshaykhiev/Workspace/bots/telegram/abdesante/)
[info] sbt server started at local:///Users/islamshaykhiev/.sbt/1.0/server/4bd9919fadde7fbdbd5e/sock
sbt:abdesante>
[info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile and 1 others.
[info] The new values will be used by cleanKeepGlobs
[info] Run `last` for details.
[info] Reapplying settings...
[info] set current project to abdesante (in build file:/Users/islamshaykhiev/Workspace/bots/telegram/abdesante/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/islamshaykhiev/Library/Application Support/JetBrains/IntelliJIdea2020.2/plugins/Scala/repo/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2018.2.1+4-88400d3f/jars/sbt-structure-extractor.jar
[info] Reapplying settings...
[info] set current project to abdesante (in build file:/Users/islamshaykhiev/Workspace/bots/telegram/abdesante/)
[warn]
[warn] Note: Unresolved dependencies path:
[error] stack trace is suppressed; run 'last update' for the full output
[error] stack trace is suppressed; run 'last ssExtractDependencies' for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.bot4s:telegram-core_2.13:4.4.0-RC2
[error] Not found
[error] Not found
[error] not found: /Users/islamshaykhiev/.ivy2/local/com.bot4s/telegram-core_2.13/4.4.0-RC2/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/bot4s/telegram-core_2.13/4.4.0-RC2/telegram-core_2.13-4.4.0-RC2.pom
[error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: Error downloading com.bot4s:telegram-core_2.13:4.4.0-RC2
[error] Not found
[error] Not found
[error] not found: /Users/islamshaykhiev/.ivy2/local/com.bot4s/telegram-core_2.13/4.4.0-RC2/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/bot4s/telegram-core_2.13/4.4.0-RC2/telegram-core_2.13-4.4.0-RC2.pom
[error] Total time: 1 s, completed 26 авг. 2020 г., 23:07:47
[info] shutting down sbt server
我究竟做错了什么?除了写台词libaryDependencies
,什么都没做。这可能是因为它是 2.12 的,但它的成本是 2.13?
是的,你的假设是正确的。这个适用于Scala 2.11 和 2.12。
该存储库有一个关于 Scala 2.13 的未解决问题。作为您的问题的解决方案 - 使用 Scala 2.12。
`%%` 操作符表示项目中安装的rock的版本会被添加到依赖的名字中。在您的情况下,这两行完全相同: