简体   繁体   English

在IntelliJ IDEA中创建Scala项目时出现问题

[英]Issues while creating Scala Project in IntelliJ IDEA

So I have been attempting to create a Scala project using SBT in IntelliJ IDEA. 因此,我一直试图在IntelliJ IDEA中使用SBT创建一个Scala项目。 I have downloaded JetBrains Scala plugin. 我已经下载了JetBrains Scala插件。 My system requires a proxy to connect to internet which I've set up in IntelliJ IDEA proxy settings I have also set up all the environment varriables JAVA_HOME, SCALA_HOME, HTTP_PROXY 我的系统需要一个代理才能连接到Internet,该代理已在IntelliJ IDEA代理设置中设置,我还设置了所有环境变量JAVA_HOME,SCALA_HOME,HTTP_PROXY

Please let me know if I am missing anything 如果我缺少任何东西,请告诉我

Stack trace is attached below. 堆栈跟踪如下所示。

[info] Loading project definition from D:\Java\Scala\Coursera\HelloTest03\project
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Defining *:shellPrompt
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Defining */*:sbtStructureOutputFile
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Defining */*:sbtStructureOptions
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from C:/Users/973855/.IdeaIC2016.3/config/plugins/Scala/launcher/sbt-structure-0.13.jar
[info] Reapplying settings...
[info] Set current project to HelloTest03 (in build file:/D:/Java/Scala/Coursera/HelloTest03/)
[info] Resolving org.scala-sbt#sbt;0.13.13 ...
[info] Resolving org.scala-lang#scala-library;2.10.6 ...
[info] Resolving org.scala-sbt#main;0.13.13 ...
[info] Resolving org.scala-sbt#actions;0.13.13 ...
[info] Resolving org.scala-sbt#classpath;0.13.13 ...
[info] Updating {file:/D:/Java/Scala/Coursera/HelloTest03/}hellotest03...
[info] Resolving org.scala-lang#scala-compiler;2.10.6 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.6 ...
[info] Resolving org.scala-sbt#interface;0.13.13 ...
[info] Resolving org.scala-sbt#io;0.13.13 ...
[info] Resolving org.scala-sbt#control;0.13.13 ...
[info] Resolving org.scala-sbt#launcher-interface;1.0.0-M1 ...
[info] Resolving org.scala-sbt#completion;0.13.13 ...
[info] Resolving org.scala-sbt#collections;0.13.13 ...
[info] Resolving jline#jline;2.13 ...
[info] Resolving org.fusesource.jansi#jansi;1.11 ...
[info] Resolving org.scala-sbt#api;0.13.13 ...
[info] Resolving org.scala-sbt#classfile;0.13.13 ...
[info] Resolving org.scala-sbt#logging;0.13.13 ...
[info] Resolving org.scala-sbt#process;0.13.13 ...
[info] Resolving org.scala-sbt#compiler-integration;0.13.13 ...
[info] Resolving org.scala-sbt#incremental-compiler;0.13.13 ...
[info] Resolving org.scala-sbt#relation;0.13.13 ...
[info] Resolving org.scala-sbt#compile;0.13.13 ...
[info] Resolving org.scala-sbt#persist;0.13.13 ...
[info] Resolving org.scala-tools.sbinary#sbinary_2.10;0.4.2 ...
[info] Resolving org.scala-sbt#compiler-ivy-integration;0.13.13 ...
[info] Resolving org.scala-sbt#ivy;0.13.13 ...
[info] Resolving org.scala-sbt#cross;0.13.13 ...
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-2cf13e211b2cb31f0d3b317289dca70eca3362f6 ...
[info] Resolving com.jcraft#jsch;0.1.50 ...
[info] Resolving org.scala-sbt#serialization_2.10;0.1.2 ...
[info] Resolving org.scala-lang.modules#scala-pickling_2.10;0.10.1 ...
[info] Resolving org.scalamacros#quasiquotes_2.10;2.0.1 ...
[info] Resolving org.json4s#json4s-core_2.10;3.2.10 ...
[info] Resolving org.json4s#json4s-ast_2.10;3.2.10 ...
[info] Resolving com.thoughtworks.paranamer#paranamer;2.6 ...
[info] Resolving org.spire-math#jawn-parser_2.10;0.6.0 ...
[info] Resolving org.spire-math#json4s-support_2.10;0.6.0 ...
[info] Resolving org.scala-sbt#run;0.13.13 ...
[info] Resolving org.scala-sbt#task-system;0.13.13 ...
[info] Resolving org.scala-sbt#tasks;0.13.13 ...
[info] Resolving org.scala-sbt#tracking;0.13.13 ...
[info] Resolving org.scala-sbt#cache;0.13.13 ...
[info] Resolving org.scala-sbt#testing;0.13.13 ...
[info] Resolving org.scala-sbt#test-agent;0.13.13 ...
[info] Resolving org.scala-sbt#test-interface;1.0 ...
[info] Resolving org.scala-sbt#main-settings;0.13.13 ...
[info] Resolving org.scala-sbt#apply-macro;0.13.13 ...
[info] Resolving org.scala-sbt#command;0.13.13 ...
[info] Resolving org.scala-sbt#template-resolver;0.1 ...
[info] Resolving org.scala-sbt#logic;0.13.13 ...
[info] Resolving org.scala-sbt#compiler-interface;0.13.13 ...
[info] Resolving org.scala-lang#scala-library;2.12.1 ...
[info] Resolving org.scala-lang#scala-library;2.12.1 ...
[warn] Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.1/scala-library-2.12.1.pom
[info] You probably access the destination server through a proxy server that is not well configured.
[warn]  module not found: org.scala-lang#scala-library;2.12.1
[warn] ==== local: tried
[warn]   C:\Users\973855\.ivy2\local\org.scala-lang\scala-library\2.12.1\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.1/scala-library-2.12.1.pom
[warn] ==== activator-launcher-local: tried
[warn]   C:\Users\973855\.activator\repository\org.scala-lang\scala-library\2.12.1\ivys\ivy.xml
[warn] ==== activator-local: tried
[warn]   D:\Java\Scala\activator-dist-1.3.12\repository\org.scala-lang\scala-library\2.12.1\ivys\ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scala-lang/scala-library/2.12.1/scala-library-2.12.1.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.12.1/ivys/ivy.xml
[info] Resolving org.scala-lang#scala-compiler;2.12.1 ...
[info] Resolving org.scala-lang#scala-compiler;2.12.1 ...
[warn] Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.1/scala-compiler-2.12.1.pom
[info] You probably access the destination server through a proxy server that is not well configured.
[warn]  module not found: org.scala-lang#scala-compiler;2.12.1
[warn] ==== local: tried
[warn]   C:\Users\973855\.ivy2\local\org.scala-lang\scala-compiler\2.12.1\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.1/scala-compiler-2.12.1.pom
[warn] ==== activator-launcher-local: tried
[warn]   C:\Users\973855\.activator\repository\org.scala-lang\scala-compiler\2.12.1\ivys\ivy.xml
[warn] ==== activator-local: tried
[warn]   D:\Java\Scala\activator-dist-1.3.12\repository\org.scala-lang\scala-compiler\2.12.1\ivys\ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scala-lang/scala-compiler/2.12.1/scala-compiler-2.12.1.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.12.1/ivys/ivy.xml
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scala-lang#scala-library;2.12.1: not found
[warn]  :: org.scala-lang#scala-compiler;2.12.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      org.scala-lang:scala-library:2.12.1 ((sbt.Classpaths) Defaults.scala#L1293)
[warn]        +- default:hellotest03_2.12:1.0
[warn]      org.scala-lang:scala-compiler:2.12.1
[warn]        +- default:hellotest03_2.12:1.0
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.12.1: not found
[error] unresolved dependency: org.scala-lang#scala-compiler;2.12.1: not found
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.12.1: not found
[error] unresolved dependency: org.scala-lang#scala-compiler;2.12.1: not found
[error] Total time: 157 s, completed Feb 27, 2017 2:52:34 PM
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0

I had a similar issue the other day. 前几天我遇到了类似的问题。 Deleting my ~/.ivy2 directory and re-creating / importing the project has solved the issue for me :) 删除~/.ivy2目录并重新创建/导入项目已经为我解决了这个问题:)

Delete your ~/.ivy2 directory and reimport. 删除~/.ivy2目录,然后重新导入。

I prefer to download activator package https://www.lightbend.com/activator/download and use it to build my project 我更喜欢下载激活程序包https://www.lightbend.com/activator/download并使用它来构建我的项目

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

相关问题 用于在IntelliJ IDEA中创建Scala项目的Scala主目录 - Scala home directory for creating Scala project in IntelliJ IDEA 在 intelliJ 中创建 Scala 项目时,SBT 和 IDEA 有什么区别? - What is the difference between SBT and IDEA when creating a Scala project in intelliJ? 已安装Scala插件,但未在IntelliJ IDEA中创建新项目中显示 - Scala plugin installed but not shown in creating new project in IntelliJ IDEA 在 intellij 上创建一个 scala 项目 - Creating a scala project on intellij Scala-SBT - 如何在IntelliJ IDEA中删除导入项目中的所有“未找到类”问题 - Scala-SBT - How can I remove all 'class not found' issues in imported project in IntelliJ IDEA Intellij IDEA Java / Scala项目子包显示 - Intellij IDEA Java/Scala project subpackage display 在 IntelliJ IDEA 中为 Scala 项目附加源 - Attaching sources in IntelliJ IDEA for scala project 调试Scala项目(IntelliJ Idea 12和sbt) - Debugging a Scala project (IntelliJ Idea 12 and sbt) 尝试在Intellij Idea Ultimate 14.0.4版中构建Play Scala项目时收到错误消息 - Getting an error message while trying to build Play Scala project in Intellij Idea Ultimate version 14.0.4 IntelliJ Idea Maven项目中Scala模块的Scala签名错误 - Scala signature error for Scala module in IntelliJ Idea Maven project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM