在Scala 2.11.4和sbt 0.12.4中加载CharSequence时出错

时间:2015-01-11 12:03:06

标签: java android linux scala sbt

我有一个android-scala项目,里面有子项目。在所有build.sbt个文件中,我设置了scalaVersion:

scalaVersion := "2.11.4"

并在project/build.properties我设置了这个:

sbt.version=0.12.4

然而,它一直生成这个(Scala 2.9.2)/home/alex/Documents/projects/android/my_project//project/target/scala-2.9.2/sbt-0.12/classes并且当我通过在根文件夹中输入sbt来运行sbt时它会一直抛出异常:

[error] error while loading CharSequence, class file '/usr/local/java/jdk1.8.0_05/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
[error] (bad constant pool tag 15 at byte 1501)
[error] one error found
[error] (compile:compile) Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

是的,我有JDK 8,但我使用的是scala 2.11.4

 echo $JAVA_HOME
/usr/local/java/jdk1.8.0_05

1 个答案:

答案 0 :(得分:6)

sbt 0.12.x不支持JDK8。请迁移到sbt 0.13.x,最新版本为0.13.7