Scala Compiler not found in Intellij IDEA 11 with

2019-03-22 14:52发布

I created a project using the typical play new, and then I used play idea to generate the .iml file. When I imported the .iml file into Intellij IDEA, I could not figure out how to get the compiler library to recognize. Below are some screenshots:

enter image description here

enter image description here

Please help!

3条回答
你好瞎i
2楼-- · 2019-03-22 15:23

A variation that worked for me: drop the Scala facet and run 'Add framework support...' again.

  1. File / Project Structure / Facets

  2. Click Scala facet then minus to remove Scala facet from your module. Click OK.

  3. Right click your project/module, 'Add Framework Support...', choose Scala.

  4. Enter the path to your Scala compiler and library.

查看更多
Explosion°爆炸
3楼-- · 2019-03-22 15:36

I also ran into this problem, but the workaround as described by Chris B did not work for me, since in my case "Scala" was missing on the "Please select the desired technologies" page.

In my case the problem appeared to be an incompatible Scala plugin. After I reinstalled the Scala plugin it worked fine.

查看更多
虎瘦雄心在
4楼-- · 2019-03-22 15:37

This is a slight weirdness with the Scala settings in IntelliJ. Currently the only way to register a scala distribution is to create a new project.

Steps:

  1. File > New Project > Create project from scratch

  2. Leave all settings as default. Project name can be anything.

  3. On the "Please select the desired technologies" page, choose Scala. Some GUI elements will appear that allow you to tell IntelliJ how to find your scala compiler and library. Make sure to set the "Level" options to "global".

  4. Click Finish. Close the dummy project that you created, and go back to your real project. The Scala compiler that you registered should now be in the list on your project settings page.

查看更多
登录 后发表回答