未解决的依赖于sbt-android-plugin 0.6.0-SNAPSHOT?

我只是遵循使用Scala构buildScala Android应用程序的步骤,当我在项目文件夹中运行sbt时,出现以下未解决的依赖性错误:

 [info] Loading project definition from /Users/macarse/Documents/scalatest/project/plugins [info] Updating {file:/Users/macarse/Documents/scalatest/project/plugins/}default-dd299a... [warn] module not found: org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT [warn] ==== typesafe-ivy-releases: tried [warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/ivys/ivy.xml [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT!sbt-android-plugin_2.9.1.jar: [warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/jars/sbt-android-plugin_2.9.1.jar [warn] ==== local: tried [warn] /Users/macarse/.ivy2/local/org.scala-tools.sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/ivys/ivy.xml [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT!sbt-android-plugin_2.9.1.jar: [warn] /Users/macarse/.ivy2/local/org.scala-tools.sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/jars/sbt-android-plugin_2.9.1.jar [warn] ==== public: tried [warn] http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/sbt-android-plugin_2.9.1-0.6.0-SNAPSHOT.pom [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT!sbt-android-plugin_2.9.1.jar: [warn] http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/sbt-android-plugin_2.9.1-0.6.0-SNAPSHOT.jar [warn] ==== Scala-Tools Maven2 Repository: tried [warn] http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/sbt-android-plugin_2.9.1-0.6.0-SNAPSHOT.pom [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT!sbt-android-plugin_2.9.1.jar: [warn] http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/sbt-android-plugin_2.9.1-0.6.0-SNAPSHOT.jar [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [error] {file:/Users/macarse/Documents/scalatest/project/plugins/}default-dd299a/*:update: sbt.ResolveException: unresolved dependency: org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT: not found Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

我错过了什么?

Solutions Collecting From Web of "未解决的依赖于sbt-android-plugin 0.6.0-SNAPSHOT?"

对于sbt 0.11.0:

  1. 按照@ Debilski的回答说明发布android-plugin到本地。
  2. rm -rvf project/plugins/
  3. 创build一个文件project/plugins.sbt ,这个文件的内容是addSbtPlugin("org.scala-tools.sbt" % "sbt-android-plugin" % "0.6.0-SNAPSHOT")
  4. 现在你应该可以在该项目下运行了
  5. android:package-debug来编译/打包g8创build的hello世界程序。
  6. android:install-device在Android设备上安装APK。

sbt-android-plugin在版本0.6.0-SNAPSHOT没有公开。 一个快速的解决办法是在本地安装。

 git clone https://github.com/jberkel/android-plugin.git cd android-plugin sbt update sbt publish-local 

当然,这只有在github版本库的主分支指向版本0.6.0-SNAPSHOT时才有效。 (如果没有了,那么我可能会怀疑0.6.0已经发布了。)