我正在尝试使用 scala 和 sbt 设置 intellij 进行开发。我已经在 IDE 上安装了 scala 和 SBT 插件。但是,当我尝试创建新的 scala 和 sbt 项目时,build.sbt 文件显示以下错误:
Cannot resolve symbol :=
Cannot resolve symbol name
Cannot resolve symbol version
Cannot resolve symbol scalaVersion
这是我的 build.sbt 文件,它是由 IDE 本身创建的:
name := "setup"
version := "1.0"
scalaVersion := "2.12.2"
以下是我创建项目所遵循的步骤:
第一步:文件->新建项目
第二步:从左侧面板中选择 Scala,在右侧面板中选择 SBT(即基于 SBT 的 Scala 项目),然后单击 Next。
第三步:填写项目详细信息,然后单击“完成”。 (Scala 版本 -> 2.12.2,SBT 版本 -> 0.13.13)
IntelliJ版本-IntelliJ IDEA 2017.1.3
Edit:
每当我尝试创建新项目时,都会收到以下错误:
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>
日志文件包含以下内容:
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/
**
所以我认为这是我的代理设置的问题,我肯定需要使用代理。有办法解决这个问题吗??
任何帮助,将不胜感激。谢谢。