scala编译的问题(2.11版本)

这是完整的堆栈跟踪

错误:sbt.compiler.CompileFailed在sbt.compiler.AnalyzingCompiler编译sbt组件'compiler-interface-2.11.4-51.0'时出错错误$ anonfun $ compileSources $ 1 $$ anonfun $ apply $ 2.apply(AnalyzingCompiler.scala:117)at at sbt.compiler.AnalyzingCompiler $$ anonfun $ compileSources $ 1 $$ anonfun $ apply $ 2.apply(AnalyzingCompiler.scala:114)at sbt.IO $ .withTemporaryDirectory(IO.scala:281)at sbt.compiler.AnalyzingCompiler $$ anonfun $ compileSources $ 1.apply(AnalyzingCompiler.scala:114)at sbt.compiler.AnalyzingCompiler $$ anonfun $ compileSources $ 1.apply(AnalyzingCompiler.scala:111)at sbt.IO $ .withTemporaryDirectory(IO.scala:281)at sbt.compiler .AnalyzingCompiler $ .compileSources(AnalyzingCompiler.scala:111)at sbt.compiler.IC $ .compileInterfaceJar(IncrementalCompiler.scala:31)at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl $ .org $ jetbrains $ jps $在org.jetbrains.jps.incremental.scala.local.CompilerFactory上增量$ scala $ local $ CompilerFactoryImpl $$ getOrCompileInterfaceJar(CompilerFactoryImpl.scala:65) Impl $$ anonfun $ 2.apply(CompilerFactoryImpl.scala:21)at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl $$ anonfun $ 2.apply(CompilerFactoryImpl.scala:20)at scala.Option.map(Option . scala:145)atg.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.createCompiler(CompilerFactoryImpl.scala:20)at org.jetbrains.jps.incremental.scala.local.CachingFactory $$ anonfun $ createCompiler $ 1.apply( CachingFactory.scala:20)atg.jetbrains.jps.incremental.scala.local.CachingFactory $$ anonfun $ createCompiler $ 1.apply(CachingFactory.scala:20)at org.jetbrains.jps.incremental.scala.local.Cache $位于org.jetbrains.jps.incremental.scala.local.Cache.getOrUpdate(Cache.scala:19)的scala.Option.getOrElse(Option.scala:120)$ anonfun $ getOrUpdate $ 2.apply(Cache.scala:20) org.jetbrains.jps.incremental.scala.local.CachingFactory.createCompiler(CachingFactory.scala:19)位于org.jetbrains的org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:21) .jps.incremental.scala.ScalaBuil der $$ anonfun $ 5 $$ anonfun $ apply $ 4 $$ anonfun $ apply $ 4.apply(ScalaBuilder.scala:118)at org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $ 5 $$ anonfun $ apply $ 3 $$ anonfun $应用$ 4.apply(ScalaBuilder.scala:100)在scala.util.Either $ RightProjection.map(Either.scala:536)org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $ 5 $$ anonfun $应用$ 3.apply(ScalaBuilder.scala:100)在org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $ 5 $$ anonfun $ apply $ 3.apply(ScalaBuilder.scala:99)在scala.util.Either $ RightProjection .flatMap(Either.scala:523)org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $ 5.apply(ScalaBuilder.scala:99)at org.jetbrains.jps.incremental.scala.ScalaBuilder $$ anonfun $ 5 .apply(ScalaBuilder.scala:98)位于org的org.jetbrains.jps.incremental.scala.ScalaBuilder.doBuild(ScalaBuilder.scala:98)的scala.util.E或$ RightProjection.flatMap(Either.scala:523) . jetbrains.jps.incremental.scala.ScalaBuilder.build(ScalaBuilder.scala:68)at org.jetbrains.jps.incremental.scala.Sca位于org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:742)的org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1018)中的laBuilderService $ ScalaBuilderDecorator.build(ScalaBuilderService.java:42) org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:790)org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(incProjectBuilder.java:705)org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks (IncProjectBuilder.java:526)位于org.jetbrains的org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:314)org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:179) . 位于org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:220)的jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java: 112)在org.jetbrains.jps.cmdline.BuildMain $ MyMessage在java.util.concurrent.Executors的org.jetbrains.jps.service.impl.SharedThreadPoolImpl $ 1.run(SharedThreadPoolImpl.java:41)处理器$ 1.run(BuildMain.java:132)$ RunnableAdapter.call(Executors.java: 471)java.util.concurrent.FutureTask.run(FutureTask.java:262)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)at atJava.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)at java.lang.Thread.run(Thread.java:745)

What is may be wrong with my envirnment? I does not post here code becose i think that code in this case does not have mean, but the same project good run on others machines.

回答(1)

2 years ago

将JDK更改为1.7

现在我有了scala.version 2.10.0,intellij中的Java 1.7.0_71为我解决了它 . 工作良好!