未解决sbt-android 0.7.1-SNAPSHOT与sbt 0.13和Scala 2.10的依赖关系?

use*_*940 1 android scala sbt sbt-android-plugin

我正在Scala中开发一个类似Hello World的Android应用程序.

我已经按照SBT-Android文档中的入门教程进行了操作,并尝试应用Android上Scala的推荐书.一个人从头开始做另一件事g8 Geal/android-app.

但在这两种情况下,我都面临同样的错误:

[warn]  module not found: org.scala-sbt#sbt-android;0.7.1-SNAPSHOT
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-android/scala_2.10/sbt_0.13/0.7.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt-android/scala_2.10/sbt_0.13/0.7.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /Users/jcarres/.ivy2/local/org.scala-sbt/sbt-android/scala_2.10/sbt_0.13/0.7.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== sbt-releases-repo: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-android/scala_2.10/sbt_0.13/0.7.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== sbt-plugins-repo: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt-android/scala_2.10/sbt_0.13/0.7.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== maven-central: tried
[warn]   http://repo1.maven.org/maven2/org/scala-sbt/sbt-android_2.10_0.13/0.7.1-SNAPSHOT/sbt-android-0.7.1-SNAPSHOT.pom
[warn] ==== scalasbt releases: tried
[warn]   http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt-android/scala_2.10/sbt_0.13/0.7.1-SNAPSHOT/ivys/ivy.xml
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scala-sbt#sbt-android;0.7.1-SNAPSHOT: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
Run Code Online (Sandbox Code Playgroud)

我已经尝试了几个版本,sbt-android似乎问题是我的Scala和sbt版本不匹配.

当我访问http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt-android时,我只能看到scala_2.9.2我的Scala版本的目录2.10.我的sbt版本0.13似乎应该是0.12.

我是否需要删除Scala 2.10并安装Scala 2.9.2和/或将sbt降级为0.12?有解决方案吗?

Rob*_*een 6

sbt 使用它自己下载的Scala副本 - 它会自动下载"正确"的版本 - 所以不需要乱用你自己安装的Scala副本.

因为这是一个sbt插件,您需要将sbt版本更改为它所期望的版本project/build.properties(如果此文件不存在,您可以创建它,具有以下内容):

sbt.version=0.12.0
Run Code Online (Sandbox Code Playgroud)

确保你reloadsbt,以便加载新的(旧)版本的sbt.

或者,当然,您可以尝试sbt-android-plugin从源代码编译sbt 0.13,通过执行相反的操作(您可能需要构建及其publish-local某些依赖项).它可能会奏效.