快速帮助。在编译期间,我得到以下错误集;

Error:(38, 21) Symbol 'type shapeless.HListerAux' is missing from the classpath.
This symbol is required by 'value spray.routing.directives.ParamDefMagnet2.hla'.
Make sure that type HListerAux is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'ParamDefMagnet2.class' was compiled against an incompatible version of shapeless.
          parameter('id) { id =>

Error:(38, 21) Symbol 'type shapeless.Poly.Case2' is missing from the classpath.
This symbol is required by 'method spray.routing.directives.ParamDefMagnet2.MapReduce.from'.
Make sure that type Case2 is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'ParamDefMagnet2.class' was compiled against an incompatible version of shapeless.Poly.
          parameter('id) { id =>

Error:(38, 21) Symbol 'type shapeless.PrependAux' is missing from the classpath.
This symbol is required by 'value spray.routing.directives.ParamDefMagnet2.MapReduce.ev'.
Make sure that type PrependAux is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'ParamDefMagnet2.class' was compiled against an incompatible version of shapeless.
          parameter('id) { id =>

Error:(38, 21) Symbol 'type shapeless.HListerAux' is missing from the classpath.
This symbol is required by 'value spray.routing.directives.ParamDefMagnet2.hla'.
Make sure that type HListerAux is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'ParamDefMagnet2.class' was compiled against an incompatible version of shapeless.
          parameter('id) { id =>

总而言之,虽然问题出在“无形”这个库中,但我已经将它作为依赖项包含在(与解析程序一起)中,
resolvers ++= Seq(
  Resolver.sonatypeRepo("releases"),
  Resolver.sonatypeRepo("snapshots")
)

libraryDependencies ++= Seq(
  "com.chuusai" %% "shapeless" % "2.3.2"
)

我希望能提出适当的建议作为解决方案。

最佳答案

我知道如何解决,我之前遇到过这个问题。
这是Shapeless Versions 的问题,请仔细阅读以下气味,您将解决此问题。

无形版本
如果您想在应用程序中使用无形状和喷雾路径,则需要选择针对您想要使用的无形状释放而构建的喷雾(路径)版本。
对于无定形的1.2.4,应使用喷雾1.1.4、1.2.4或1.3.4和喷雾路由模块。
Shapeless 2.0.0不再受支持。
对于无形状2.3.0,应使用spray 1.3.4(Scala 2.10或Scala 2.11)和spray-routing-shapeless23模块,而不要使用rout-routing

libraryDependencies ++= "io.spray" %% "spray-routing-shapeless23" % "1.3.4",

关于scala - 类路径中缺少符号 'type shapeless.LeftFolder',我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46343342/

10-11 10:44