Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error while loading CharSequence in Scala 2.11.4 and sbt 0.12.4

I have an android-scala project which has subprojects in it. In all build.sbt files I set the scalaVersion:

scalaVersion := "2.11.4"

and in project/build.properties I set this:

sbt.version=0.12.4

However, it keeps generating this (Scala 2.9.2) /home/alex/Documents/projects/android/my_project//project/target/scala-2.9.2/sbt-0.12/classes and it keeps throws an exception when I run sbt by just typing sbt in the root folder:

[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?

Yes, I have JDK 8, but I'm using scala 2.11.4.

 echo $JAVA_HOME
/usr/local/java/jdk1.8.0_05
like image 591
Incerteza Avatar asked Jan 11 '15 12:01

Incerteza


1 Answers

sbt 0.12.x does not support JDK8. Please migrate to sbt 0.13.x, the latest is 0.13.7

like image 79
jsuereth Avatar answered Oct 19 '22 01:10

jsuereth