本文介绍了使用Intellij IDE运行Scala Dotty项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我使用Dotty模板创建了一个基本的Scala Dotty项目,并将该项目导入Intellij IDE.

当我使用sbt命令行时,一切正常.

当我尝试在Intellij IDE中构建或运行它时,出现以下错误:

Error:scalac: Multiple 'scala-library*.jar' files (scala-library-0.9.0-RC1.jar, scala-library-2.12.6.jar) in Scala compiler classpath in Scala SDK sbt: ch.epfl.lamp:dotty-library_0.9:0.9.0-RC1:jar

有什么办法解决这个问题吗?

解决方案

IDE支持对于Dotty

无论如何,当您将项目导入IntelliJ IDEA时,请选中使用sbt shell".至少对我来说,之后测试项目会编译并使用Ctrl + Shift + F10运行. >

可能并非所有功能都能正常工作.例如, Dotty宏不会,但是如果我手动编译并运行,它们就可以.

I created a basic Scala Dotty project using Dotty template and import the project to Intellij IDE.

Everything works fine when I use the sbt command line.

When I try to build or run it inside Intellij IDE, I got following errors:

Error:scalac: Multiple 'scala-library*.jar' files (scala-library-0.9.0-RC1.jar, scala-library-2.12.6.jar) in Scala compiler classpath in Scala SDK sbt: ch.epfl.lamp:dotty-library_0.9:0.9.0-RC1:jar

Any ideas how to solve this?

解决方案

IDE support for Dotty

Anyway when you import a project to IntelliJ IDEA check "use sbt shell". At least for me after that a test project compiles and runs with Ctrl+Shift+F10.

It's possible that not everything will work. For example Dotty macros don't but if I compile and run manually then they do.

这篇关于使用Intellij IDE运行Scala Dotty项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 22:08