0

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

user3448011
  • 1,469
  • 1
  • 17
  • 39
  • Current intelliJ has great support for Scala. You can easily work with a Scala project just by installing scala-plugin and then simply creating a `sbt` project with intelliJ's new-project wizard. Use `scala 2.12.8`. – sarveshseri Sep 08 '19 at 23:52
  • I am using scala = 2.13.0 and sbt = 1.3 but I still got the same error. – user3448011 Sep 09 '19 at 16:24
  • you can try `sbt new scala/scala-seed.g8` and import to IDEA later – Dmytro Orlov Sep 18 '19 at 11:05

0 Answers0