导入时IntelliJ + Scala错误? [error](/:dumpStructure)java.net.URISyntaxException:

时间:2017-01-14 15:33:30

标签: java scala intellij-idea

没有太多可以解释我会简单地写一个日志部分:

Error:Error while importing SBT project:<br/>...<br/><pre>[info] Resolving jline#jline;2.12.1 ...
[info] Resolving com.typesafe.play#fork-run_2.11;2.4.3 ...
[info] Resolving com.typesafe.play#fork-run-protocol_2.11;2.4.3 ...
[info] Resolving com.typesafe.play#run-support_2.11;2.4.3 ...
[info] Resolving org.scala-lang#scala-reflect;2.11.5 ...
[info] Resolving org.scala-lang.modules#scala-pickling_2.11;0.10.0 ...
[info] Resolving org.scala-lang#scala-compiler;2.11.4 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.2 ...
[info] Resolving org.scala-lang.modules#scala-parser-combinators_2.11;1.0.2 ...
[info] Resolving org.json4s#json4s-core_2.11;3.2.10 ...
[info] Resolving org.json4s#json4s-ast_2.11;3.2.10 ...
[info] Resolving com.thoughtworks.paranamer#paranamer;2.6 ...
[info] Resolving org.spire-math#jawn-parser_2.11;0.6.0 ...
[info] Resolving org.spire-math#json4s-support_2.11;0.6.0 ...
[info] Resolving com.typesafe.akka#akka-actor_2.11;2.3.8 ...
[info] Resolving com.typesafe#config;1.2.1 ...
[info] Resolving com.typesafe.akka#akka-testkit_2.11;2.3.8 ...
[error] (*/*:dumpStructure) java.net.URISyntaxException: Illegal character in path at index 10: file:///C:\Users\spec8/.m2/repository
[error] Total time: 12 s, completed 2017-01-14 16:26:55
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\spec8\.IntelliJIdea2016.3\system\log\sbt.last.log">C:\Users\spec8\.IntelliJIdea2016.3\system\log\sbt.last.log</a>

正如您所看到的,我正在使用Windows的任何想法是什么原因造成的?我看到Scala有一些路径问题,但我不知道为什么

2 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,回滚到2016.3.1版本的scala插件,问题就消失了。

下载2016.3.1版本并从磁盘安装。

Here下载链接。

答案 1 :(得分:0)

有时您无法降级插件版本,因为它还要求您降级IDE版本。所以我找到的解决方案是你必须编辑build.sbt文件,并替换以下行:

“本地Maven存储库”位于“file:///”+ Path.userHome.absolutePath +“/。m2 /存储库”,

使用硬编码路径,absolutePath属性使用Windows的路径分隔符,解析器需要* nix分隔符。所以用这个替换它:

“Local Maven Repository”位于“file:/// C:/path/to/.m2/repository”,// + Path.userHome.absolutePath +“/。m2 / repository”,

它应该有用。