【发布时间】:2015-03-09 20:28:57
【问题描述】:
我收到一个错误there were 15 feature warning(s); re-run with -feature for details:
$ /usr/local/sbt/bin/sbt
[info] Loading project definition from /home/alex/Documents/projects/my_app123/project
[info] Set current project to sbt-android (in build file:/home/alex/Documents/projects/my_app123/)
> compile -feature
[error] Expected end of input.
[error] compile -feature
[error] ^
> sbt-version
[info] 0.12.4
> compile
[warn] Credentials file /home/alex/.ivy2/.credentials does not exist
[info] Compiling 20 Scala sources to /home/alex/Documents/projects/my_app123/target/scala-2.10/sbt-0.12/classes...
[error] there were 15 feature warning(s); re-run with -feature for details
[error] one error found
[error] (compile:compile) Compilation failed
[error] Total time: 27 s, completed 01 12, 15 1:20:12 PM
在build.sbt
scalaVersion := "2.10.4"
我无法找出那个错误是什么,因为它没有说,即使我以$ /usr/local/sbt/bin/sbt -feature 运行 sbt。
$ /usr/local/sbt/bin/sbt -feature
[info] Loading project definition from /home/alex/Documents/projects/my_app123/project
[info] Set current project to sbt-android (in build file:/home/alex/Documents/projects/my_app123/)
$
它是 JDK 1.7
错误是什么,我该如何解决?
更新:
build.sbt
scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
或在 sbt 本身中:
> set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
错误依旧。
【问题讨论】:
-
@som-snytt,没有帮助。
-
你想要
-feature。 -
@som-snytt,你读过我的问题吗?这就是我所做的 -
-feature. -
在您的更新中,您添加了 -unchecked 和 -deprecation,而不是 -feature。如果我没有读到问题,我就不会卷入刚才的聊天中。但是,如果链接对您没有用,请见谅。