简体   繁体   English

为Scala / SBT设置IntelliJ IDEA Ultimate

[英]Setting up IntelliJ IDEA Ultimate for Scala/SBT

I' ve been struggling with setting up IntelliJ IDEA Ultimate for use with Scala/SBT for the past couple of hours and currently i am facing an error that i dont even know how to look up properly. 在过去的几个小时中,我一直在努力设置与Scala / SBT配合使用的IntelliJ IDEA Ultimate,目前我遇到的错误是我什至不知道如何正确查找。 Googleing the error code didnt help unfortunately :(. 谷歌的错误代码并没有帮助:(。

So, everytime i set up a new project or import an existing one, following the instructions found here: 因此,每次我按照下面的说明建立一个新项目或导入一个现有项目时:

https://scala-lang.org/documentation/getting-started-intellij-track/building-a-scala-project-with-intellij-and-sbt.html https://scala-lang.org/documentation/getting-started-intellij-track/building-a-scala-project-with-intellij-and-sbt.html

and

https://www.jetbrains.com/help/idea/creating-and-running-your-scala-application.html https://www.jetbrains.com/help/idea/creating-and-running-your-scala-application.html

i am getting the following error msg as soon as the project has finished loading: 项目完成加载后,我将收到以下错误消息:

Error:Error while importing SBT project: 错误:导入SBT项目时出错:
... ...

[error]   at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error]     at sbt.std.Transform$$anon$4.work(System.scala:64)

[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:257) [error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16) [error] at sbt.Execute.work(Execute.scala:266) [error] at sbt.Execute.$anonfun$submit$1(Execute.scala:257) [error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167) [error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:32) [error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) [error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) [error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) [error] at java.base/java.lang.Thread.run(Thread.java:844) [error] (*:update) sbt.librarymanagement.ResolveException: download failed: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar) Invalid response.


See complete log in file:/home/a0947188/.IntelliJIdea2017.2/system/log/sbt.last.log 请参阅完整的登录文件:/home/a0947188/.IntelliJIdea2017.2/system/log/sbt.last.log

I have properly installed SBT 1.0.3 and the scala plugin 2.1.14. 我已经正确安装了SBT 1.0.3和scala插件2.1.14。

Do you have any idea what i can do about this? 你知道我能做什么吗? I need to hand in the project in 2 weeks and our teacher specifically requires us to use IntelliJ IDEA. 我需要在2周内提交项目,我们的老师特别要求我们使用IntelliJ IDEA。

Lorenz I had exactly the same problem. 洛伦兹我也有同样的问题。 When reading the whole error message i found https://dl.bintray.com/sbt/sbt-plugin-releases/org.apache.logging.log4j where sbt seems to search for an update, but it is not available. 在阅读整个错误消息时,我发现https://dl.bintray.com/sbt/sbt-plugin-releases/org.apache.logging.log4j ,其中sbt似乎在搜索更新,但它不可用。

My solution was, to use older SBT and Scala plugins: I'm now using SBT 0.13.13 and Scala 2.12.0 and everything is working fine so far. 我的解决方案是,使用旧的SBT和Scala插件:我现在使用的是SBT 0.13.13和Scala 2.12.0,到目前为止一切正常。 (JDK version should be 1.8) (JDK版本应为1.8)

I hope it will work for you too. 我希望它也对您有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM