I am trying to run a simple "HelloWorld" scala program in IntelliJ IDEA on MacBook pro.
I follow the instructions at: https://docs.scala-lang.org/getting-started/intellij-track/getting-started-with-scala-in-intellij.html
But, I got error:
Error:scalac: Error: Error compiling the sbt component 'compiler-interface-2.11.0-56.0'
sbt.internal.inc.CompileFailed: Error compiling the sbt component 'compiler-interface-2.11.0-56.0'
at sbt.internal.inc.AnalyzingCompiler$.handleCompilationError$1(AnalyzingCompiler.scala:331)
at sbt.internal.inc.AnalyzingCompiler$.$anonfun$compileSources$4(AnalyzingCompiler.scala:346)
at sbt.internal.inc.AnalyzingCompiler$.$anonfun$compileSources$4$adapted(AnalyzingCompiler.scala:341)
at sbt.io.IO$.withTemporaryDirectory(IO.scala:376)
I have tried the solutions at Scala Compiliation error with intellij
but, none of them work. It seems that some sbt components are not compatible with scala version ?
I have tried scala versions of
2.11.0
2.13.0-M1
but, I got same errors.
My IntelliJ IDEA version: COMMUNITY 2019.2.2 . and runtime version: 11.0.3.
My Java: JDK 1.8.0
But, I can run the same scala program from the terminal in IntelliJ IDEA.
Do I miss something or set something wrong in IntelliJ IDEA ?
thanks