Error: scala: 'jvm-1.8' is not a valid choice for '-target' in sbt project

I have a scala, sbt project to run and get an exception below. When trying to find a solution on the Internet, only gradle related solutions were available.

Error: scala: 'jvm-1.8' is not a valid choice for '-target'

Error: scala: invalid option: '-target: jvm-1.8'

I tried changing the compiler configuration and other intuitive settings, but to no avail, to get rid of this problem. What is missing here?

Attached screenshot. enter image description here

+5
source share
2 answers

This parameter is absent in SBT (added to build.sbt):

javacOptions ++= Seq("-target", "1.8") 
+1
source

ran into the same problem with gradle. it turns out you need to update gradle to the latest version. You could try trying for SBT.

0
source

All Articles