如何在SBT / Android插件/项目中更改Scala版本?

时间:2012-07-11 07:21:28

标签: android scala sbt scala-2.10 sbt-android-plugin

我正在使用SBT v0.13和jberkel / android-plugin,我试图修改它。

为了做到这一点,我需要在我的测试项目中使用Scala 2.10.0-20120710-144914-026a70d555

到目前为止,我已经使用过Scala 2.9.1了,我现在需要切换到2.10.0-20120710-144914-026a70d555,但我对这些东西并不那么精通。

我遇到了这个question,但这对我不起作用。

当我尝试编译并将测试应用程序推送到设备时,我得到以下输出:

[info] Wrote C:\Users\Administrator\myProject\target\scala-2.10.0-20120710-144914-026a70d555\src_managed\main\scala\com\google\summer\TR.scala  
[info] Updating {file:/C:/Users/Administrator/myProject/}My Project...  
[info] Resolving org.scala-lang#scala-library;2.10.0-20120710-144914-026a70d555 ...  
[warn]  module not found: org.scala-lang#scala-library;2.10.0-20120710-144914-026a70d555  
[warn] ==== local: tried  
[warn]   C:\Users\Administrator\.ivy2/local/org.scala-lang/scala-library/2.10.0-20120710-144914-026a70d555/ivys/ivy.xml  
[warn] ==== public: tried  
[warn]   http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.0-20120710-144914-026a70d555/scala-library-2.10.0-20120710-144914-026a70d555.pom  
[info] Resolving org.scalatest#scalatest_2.10.0-20120710-144914-026a70d555;1.8.RC1 ...  
[warn]  module not found: org.scalatest#scalatest_2.10.0-20120710-144914-026a70d555;1.8.RC1  
[warn] ==== local: tried  
[warn]   C:\Users\Administrator\.ivy2/local/org.scalatest/scalatest_2.10.0-20120710-144914-026a70d555/1.8.RC1/ivys/ivy.xml  
[warn] ==== public: tried  
[warn]   http://repo1.maven.org/maven2/org/scalatest/scalatest_2.10.0-20120710-144914-026a70d555/1.8.RC1/scalatest_2.10.0-20120710-144914-026a70d555-1.8.RC1.pom  
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::  
[warn]  ::          UNRESOLVED DEPENDENCIES         ::  
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::  
[warn]  :: org.scala-lang#scala-library;2.10.0-20120710-144914-026a70d555: not found  
[warn]  :: org.scalatest#scalatest_2.10.0-20120710-144914-026a70d555;1.8.RC1: not found  
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::  
[error] {file:/C:/Users/Administrator/myProject/}My Project/*:update: sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.0-20120710-144914-026a70d555: not found  
[error] unresolved dependency: org.scalatest#scalatest_2.10.0-20120710-144914-026a70d555;1.8.RC1: not found  
[error] Total time: 1 s, completed 11.07.2012. 08:55:13  

1 个答案:

答案 0 :(得分:4)

我认为你需要

  

设置scalaVersion:=“2.10.0-SNAPSHOT”

它会自动选择最新发布的scala版本。