2014-10-10 63 views
1

我試圖創建idea 13.1.5.如何修復Scala編譯錯誤?無法在理念編譯13.1.5

java version "1.7.0_67" 
Java(TM) SE Runtime Environment (build 1.7.0_67-b01) 
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) 

Scala Version is 2.11.2-1 

一個非常簡單的應用階在編譯,它總是抱怨以下錯誤:

Error:scalac: Error: object java.lang.Object in compiler mirror not found. 
scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found. 
    at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17) 
    at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18) 
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53) 
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45) 
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45) 
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66) 
    at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102) 
    at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105) 
    at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257) 
    at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257) 
    at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1376) 
    at scala.tools.nsc.Global$Run.<init>(Global.scala:1229) 
    at xsbt.CachedCompiler0$$anon$2.<init>(CompilerInterface.scala:116) 
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:116) 
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:102) 
    at xsbt.CompilerInterface.run(CompilerInterface.scala:27) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102) 
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48) 
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41) 
    at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:28) 
    at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26) 
    at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:64) 
    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:22) 
    at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319) 
+1

問題在removi後解決在_ $ HOME_目錄中輸入**。IdeaIC13 **。 – hseagle 2014-10-10 03:39:32

+0

爲什麼刪除該目錄很重要? – 2016-03-18 18:43:27

回答

0

不知道爲什麼,但在$ HOME目錄中刪除.IdeaIC13即可解決問題

+0

也許這可能有助於解釋https://intellij-support.jetbrains.com/hc/en-us/community/posts/205997119-Anyone-got-scala-working-under-Intellij-14?page=1#community_comment_205776805 。 – Aris2World 2016-10-20 10:09:39

+0

未找到java.lang.Object與破壞的Java運行時依賴關係有關。當你刪除.IdeaIC13然後IDE再次創建它?也許是一個骯髒的緩存配置... – Aris2World 2016-10-20 10:12:46