当前位置: 代码迷 >> 综合 >> Error:scalac: Error: scala.collection.immutable.$colon$colon.tl$1()Lscala/collection/immutable/List;
  详细解决方案

Error:scalac: Error: scala.collection.immutable.$colon$colon.tl$1()Lscala/collection/immutable/List;

热度:83   发布时间:2024-02-24 01:15:55.0

intellij包错如下:

Error:scalac: Error: scala.collection.immutable.$colon$colon.tl$1()Lscala/collection/immutable/List;
java.lang.NoSuchMethodError: scala.collection.immutable.$colon$colon.tl$1()Lscala/collection/immutable/List;at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance$ArrayType$.unapply(TypeAnalyzer.scala:291)at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance$$anonfun$analyze$1.apply(TypeAnalyzer.scala:62)at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance$$anonfun$analyze$1.apply(TypeAnalyzer.scala:49)at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance$UDTAnalyzerCache$$anonfun$getOrElseUpdate$2$$anonfun$apply$4.apply(TypeAnalyzer.scala:481)at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance$UDTAnalyzerCache$$anonfun$getOrElseUpdate$2$$anonfun$apply$4.apply(TypeAnalyzer.scala:481)at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance$UDTAnalyzerCache$$anonfun$getOrElseUpdate$2.apply(TypeAnalyzer.scala:480)at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance$UDTAnalyzerCache$$anonfun$getOrElseUpdate$2.apply(TypeAnalyzer.scala:478)at scala.Option.getOrElse(Option.scala:189)at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance$UDTAnalyzerCache.getOrElseUpdate(TypeAnalyzer.scala:478)at org.apache.flink.api.scala.codegen.TypeAnalyzer$UDTAnalyzerInstance.analyze(TypeAnalyzer.scala:49)at org.apache.flink.api.scala.codegen.TypeAnalyzer$class.getUDTDescriptor(TypeAnalyzer.scala:39)at org.apache.flink.api.scala.codegen.MacroContextHolder$$anon$1.getUDTDescriptor(MacroContextHolder.scala:30)at org.apache.flink.api.scala.codegen.TypeInformationGen$class.mkTypeInfo(TypeInformationGen.scala:46)at org.apache.flink.api.scala.codegen.MacroContextHolder$$anon$1.mkTypeInfo(MacroContextHolder.scala:30)at org.apache.flink.api.scala.typeutils.TypeUtils$.createTypeInfo(TypeUtils.scala:31)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at scala.reflect.macros.runtime.JavaReflectionRuntimes$JavaReflectionResolvers.$anonfun$resolveJavaReflectionRuntime$6(JavaReflectionRuntimes.scala:51)at scala.tools.nsc.typechecker.Macros.macroExpandWithRuntime(Macros.scala:823)at scala.tools.nsc.typechecker.Macros.macroExpandWithRuntime$(Macros.scala:799)at scala.tools.nsc.Global$$anon$5.macroExpandWithRuntime(Global.scala:483)at scala.tools.nsc.typechecker.Macros$MacroExpander.$anonfun$expand$1(Macros.scala:629)at scala.tools.nsc.Global.withInfoLevel(Global.scala:229)at scala.tools.nsc.typechecker.Macros$MacroExpander.expand(Macros.scala:622)at scala.tools.nsc.typechecker.Macros$MacroExpander.apply(Macros.scala:609)at scala.tools.nsc.typechecker.Macros.standardMacroExpand(Macros.scala:784)at scala.tools.nsc.typechecker.Macros.standardMacroExpand$(Macros.scala:782)at scala.tools.nsc.Global$$anon$5.standardMacroExpand(Global.scala:483)at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:457)at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:454)at scala.tools.nsc.typechecker.AnalyzerPlugins.invoke(AnalyzerPlugins.scala:411)at scala.tools.nsc.typechecker.AnalyzerPlugins.pluginsMacroExpand(AnalyzerPlugins.scala:454)at scala.tools.nsc.typechecker.AnalyzerPlugins.pluginsMacroExpand$(AnalyzerPlugins.scala:454)at scala.tools.nsc.Global$$anon$5.pluginsMacroExpand(Global.scala:483)at scala.tools.nsc.typechecker.Macros.macroExpand(Macros.scala:773)at scala.tools.nsc.typechecker.Macros.macroExpand$(Macros.scala:766)at scala.tools.nsc.Global$$anon$5.macroExpand(Global.scala:483)at scala.tools.nsc.typechecker.Macros$$anon$4.transform(Macros.scala:963)at scala.tools.nsc.typechecker.Macros.macroExpandAll(Macros.scala:971)at scala.tools.nsc.typechecker.Macros.macroExpandAll$(Macros.scala:952)at scala.tools.nsc.Global$$anon$5.macroExpandAll(Global.scala:483)at scala.tools.nsc.typechecker.Macros.macroExpandWithRuntime(Macros.scala:808)at scala.tools.nsc.typechecker.Macros.macroExpandWithRuntime$(Macros.scala:799)at scala.tools.nsc.Global$$anon$5.macroExpandWithRuntime(Global.scala:483)at scala.tools.nsc.typechecker.Macros$MacroExpander.$anonfun$expand$1(Macros.scala:629)at scala.tools.nsc.Global.withInfoLevel(Global.scala:229)at scala.tools.nsc.typechecker.Macros$MacroExpander.expand(Macros.scala:622)at scala.tools.nsc.typechecker.Macros$MacroExpander.apply(Macros.scala:609)at scala.tools.nsc.typechecker.Macros.standardMacroExpand(Macros.scala:784)at scala.tools.nsc.typechecker.Macros.standardMacroExpand$(Macros.scala:782)at scala.tools.nsc.Global$$anon$5.standardMacroExpand(Global.scala:483)at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:457)at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:454)at scala.tools.nsc.typechecker.AnalyzerPlugins.invoke(AnalyzerPlugins.scala:411)at scala.tools.nsc.typechecker.AnalyzerPlugins.pluginsMacroExpand(AnalyzerPlugins.scala:454)at scala.tools.nsc.typechecker.AnalyzerPlugins.pluginsMacroExpand$(AnalyzerPlugins.scala:454)at scala.tools.nsc.Global$$anon$5.pluginsMacroExpand(Global.scala:483)at scala.tools.nsc.typechecker.Macros.macroExpand(Macros.scala:773)at scala.tools.nsc.typechecker.Macros.macroExpand$(Macros.scala:766)at scala.tools.nsc.Global$$anon$5.macroExpand(Global.scala:483)at scala.tools.nsc.typechecker.Macros$DefMacroExpander.onDelayed(Macros.scala:756)at scala.tools.nsc.typechecker.Macros$MacroExpander.$anonfun$expand$1(Macros.scala:643)at scala.tools.nsc.Global.withInfoLevel(Global.scala:229)at scala.tools.nsc.typechecker.Macros$MacroExpander.expand(Macros.scala:622)at scala.tools.nsc.typechecker.Macros$MacroExpander.apply(Macros.scala:609)at scala.tools.nsc.typechecker.Macros.standardMacroExpand(Macros.scala:784)at scala.tools.nsc.typechecker.Macros.standardMacroExpand$(Macros.scala:782)at scala.tools.nsc.Global$$anon$5.standardMacroExpand(Global.scala:483)at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:457)at scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$10.default(AnalyzerPlugins.scala:454)at scala.tools.nsc.typechecker.AnalyzerPlugins.invoke(AnalyzerPlugins.scala:411)at scala.tools.nsc.typechecker.AnalyzerPlugins.pluginsMacroExpand(AnalyzerPlugins.scala:454)at scala.tools.nsc.typechecker.AnalyzerPlugins.pluginsMacroExpand$(AnalyzerPlugins.scala:454)at scala.tools.nsc.Global$$anon$5.pluginsMacroExpand(Global.scala:483)at scala.tools.nsc.typechecker.Macros.macroExpand(Macros.scala:773)at scala.tools.nsc.typechecker.Macros.macroExpand$(Macros.scala:766)at scala.tools.nsc.Global$$anon$5.macroExpand(Global.scala:483)at scala.tools.nsc.typechecker.Typers$Typer.vanillaAdapt$1(Typers.scala:1162)at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1225)at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1198)at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1218)at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit1(Implicits.scala:778)at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.typedImplicit0(Implicits.scala:715)at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.scala$tools$nsc$typechecker$Implicits$ImplicitSearch$$typedImplicit(Implicits.scala:540)at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.rankImplicits(Implicits.scala:1113)at scala.tools.nsc.typechecker.Implicits$ImplicitSearch$ImplicitComputation.findBest(Implicits.scala:1144)at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1201)at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1571)at scala.tools.nsc.typechecker.Implicits.inferImplicit1(Implicits.scala:110)at scala.tools.nsc.typechecker.Implicits.inferImplicit(Implicits.scala:92)at scala.tools.nsc.typechecker.Implicits.inferImplicit$(Implicits.scala:89)at scala.tools.nsc.Global$$anon$5.inferImplicit(Global.scala:483)at scala.tools.nsc.typechecker.Implicits.inferImplicitFor(Implicits.scala:47)at scala.tools.nsc.typechecker.Implicits.inferImplicitFor$(Implicits.scala:46)at scala.tools.nsc.Global$$anon$5.inferImplicitFor(Global.scala:483)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$applyImplicitArgs$2(Typers.scala:262)at scala.tools.nsc.typechecker.Typers$Typer.applyImplicitArgs(Typers.scala:255)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$adapt$1(Typers.scala:900)at scala.tools.nsc.typechecker.Typers$Typer.adaptToImplicitMethod$1(Typers.scala:490)at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1221)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5738)at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5808)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5679)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$39(Typers.scala:4832)at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:712)at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4834)at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4862)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5678)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5808)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5679)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$39(Typers.scala:4832)at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:712)at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4834)at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4862)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5678)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5808)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5679)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$39(Typers.scala:4832)at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:712)at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4834)at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4862)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5678)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5808)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5679)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$39(Typers.scala:4832)at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:712)at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4834)at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4862)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5678)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5808)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5679)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$39(Typers.scala:4832)at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:712)at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4834)at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4862)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5678)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:5788)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3335)at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3335)at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2495)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$103(Typers.scala:5653)at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:499)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5688)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:5940)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5643)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:5788)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3335)at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3335)at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:2017)at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1883)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5645)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:5788)at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3335)at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3335)at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5354)at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5647)at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5724)at scala.tools.nsc.typechecker.Analyzer$typerFactory$TyperPhase.apply(Analyzer.scala:115)at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:454)at scala.tools.nsc.typechecker.Analyzer$typerFactory$TyperPhase.run(Analyzer.scala:104)at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1511)at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1495)at scala.tools.nsc.Global$Run.compileSources(Global.scala:1488)at scala.tools.nsc.Global$Run.compile(Global.scala:1614)at xsbt.CachedCompiler0.run(CompilerInterface.scala:130)at xsbt.CachedCompiler0.run(CompilerInterface.scala:105)at xsbt.CompilerInterface.run(CompilerInterface.scala:31)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:237)at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111)at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90)at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:40)at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:35)at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:83)at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:26)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:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

原因:

设置的sdk的scala版本与pom.xml中的scala版本不一样.

解决方案如下:

确保sdk和pom.xml中的scala都是2.11

 

  相关解决方案