用ieda写scala程序修改之后在运行报错 Could not find an output directory for xx

ConstantType(value = Constant(com.zx.ackka.Master))
uncaught exception during compilation: scala.reflect.internal.FatalError
Error:scalac: Error: Could not find an output directory for F:\spark\AkkaRpc\src\main\scala\com\zx\ackka\Master.scala in List((F:\spark\akkaRpc\src\test\scala,F:\spark\akkaRpc\target\classes), (F:\spark\akkaRpc\src\main\resources,F:\spark\akkaRpc\target\classes), (F:\spark\akkaRpc\src\main\scala,F:\spark\akkaRpc\target\classes))
scala.reflect.internal.FatalError: Could not find an output directory for F:\spark\AkkaRpc\src\main\scala\com\zx\ackka\Master.scala in List((F:\spark\akkaRpc\src\test\scala,F:\spark\akkaRpc\target\classes), (F:\spark\akkaRpc\src\main\resources,F:\spark\akkaRpc\target\classes), (F:\spark\akkaRpc\src\main\scala,F:\spark\akkaRpc\target\classes))


at scala.tools.nsc.settings.MutableSettings$OutputDirs.outputDirFor(MutableSettings.scala:303)


at scala.tools.nsc.backend.jvm.BytecodeWriters$class.outputDirectory(BytecodeWriters.scala:26)


at scala.tools.nsc.backend.jvm.BytecodeWriters$class.scala$tools$nsc$backend$jvm$BytecodeWriters$$getFile(BytecodeWriters.scala:37)


at scala.tools.nsc.backend.jvm.BytecodeWriters$ClassBytecodeWriter$class.writeClass(BytecodeWriters.scala:89)


at scala.tools.nsc.backend.jvm.GenASM$AsmPhase$$anon$4.writeClass(GenASM.scala:67)


at scala.tools.nsc.backend.jvm.GenASM$JBuilder.writeIfNotTooBig(GenASM.scala:459)


at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1413)


at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:120)


at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)


at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)


at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)


at scala.tools.nsc.Global$Run.compile(Global.scala:1662)


at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)


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:29)


at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)


at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:62)


at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:20)


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)


Warning:scalac: Recompiling 1 files

Warning:scalac: 




我的解决办法是删除 target 目录下 classes     generated-sources     .scala_denpendencies 这三个目录/文件  虽然这样可以暂时解决这个问题

不过我的方法肯定不对,如果有大神懂的,请帮吗指正 ,欢迎评论,谢谢



你可能感兴趣的:(scala,ieda)