java: javacTask: source release 8 requires target release 1.8 (sbt project)
I have an sbt project:
name := "experiments"
scalaVersion := "2.10.4"
javacOptions ++= Seq("-source", "1.8","-target","1.8")
version := "1.0"
This imports ok and I can see in the java compiler settings , Project Bytecode level is 1.8 and additional compiler parameters are -source 1.8 -target 1.8
But still when I compile the project, I get this error:
java: javacTask: source release 8 requires target release 1.8 (sbt project)
Any ideas what might be wrong?
请先登录再写评论。
Hi! Currently it's not always obvious how to determine intended JDK for an SBT project. While I'm unable to reproduce the problem, here's what you may check to resolve the error:
There was a similar report at StackOverflow (Maven-related, though), so you may also verify .idea/compiler.xml file ("target" attribute value).
Please tell us whether all that will help.