Setting up IntelliJ with Scala and SBT

I am trying to set up intellij with scala and sbt for development. I have already installed the scala and SBT plugins in the IDE. However, when I try to create a new scala and sbt project, the build.sbt file displays the following errors:

Cannot resolve symbol :=
Cannot resolve symbol name
Cannot resolve symbol version
Cannot resolve symbol scalaVersion

      

Here is my build.sbt file, which was generated by the IDE itself:

name := "setup"

version := "1.0"

scalaVersion := "2.12.2"

      

Below are the steps I followed to create the project:

Step one: File -> New Project

Step two: select scala on the left side of the pane and select SBT on the right side pane (for example, a scala based SB60 project) and click Next.

Step three: fill in the project details and click Finish. (scala version -> 2.12.2, SBT version -> 0.13.13)

IntelliJ version - IntelliJ IDEA 2017.1.3

Edit:

Whenever I try to create a new project, I get the following error:

Error:Error while importing SBT project:<br/>...<br/><pre>    https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar

        ::::::::::::::::::::::::::::::::::::::::::::::

        ::          UNRESOLVED DEPENDENCIES         ::

        ::::::::::::::::::::::::::::::::::::::::::::::

        :: org.fusesource.jansi#jansi;1.11: not found

        ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.fusesource.jansi#jansi;1.11: not found
Error during sbt execution: Error retrieving required libraries
  (see C:\Users\xxxxxx\.sbt\boot\update.log for complete log)
Error: Could not retrieve jansi 1.11
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0</pre><br/>See complete log in <a href="C:\Users\xxxxx\.IntelliJIdea2016.2\system\log\sbt.last.log">C:\Users\xxxxx\.IntelliJIdea2016.2\system\log\sbt.last.log</a>

      

The log file has the following content:

Getting org.fusesource.jansi jansi 1.11 ...
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
:: problems summary ::
:::: WARNINGS
    Host jcenter.bintray.com not found. url=https://jcenter.bintray.com/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
    Host jcenter.bintray.com not found. url=https://jcenter.bintray.com/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
    Host repo.typesafe.com not found. url=https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
    Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/

      

** So I think this is a problem with the proxy settings and I should definitely use a proxy. Is there a way to solve this problem?

Any help would be greatly appreciated. Thank.

+4


source to share





All Articles