2017-09-21 124 views
0

快速解答此問題。編譯期間,我得到以下一組錯誤;類路徑中缺少符號'type shapeless.LeftFolder'

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" 
) 

我希望合適的建議作爲修復。

回答

1

我知道如何解決它,我之前遇到過這個問題。 這是無形版本問題,請仔細閱讀以下情節,並且您將解決此問題。

無形版本 如果你想用無形的,以及噴霧路由在你的應用程序,你需要選擇噴霧(-routing),這是建立對無形的版本中,您想使用哪個版本。 對於無定形1.2.4,應使用噴霧器1.1.4,1.2.4或1.3.4和噴霧路由模塊。 無形2.0.0不再受支持。 對於無定形2.3.0,您應該使用噴霧1.3.4(Scala 2.10或Scala 2.11)和噴霧路由無形23模塊來代替噴霧路由

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