类路径中缺少符号“type akka.stream.scaladsl.Flow

w51jfk4q  于 2023-01-30  发布在  Scala
关注(0)|答案(1)|浏览(148)

我正在学习Scala并观看此视频https://www.youtube.com/watch?v=yU85EowqhY4,但当我尝试运行AkkaHttpJson类时,我最终收到此错误
Symbol 'type akka.stream.scaladsl.Flow' is missing from the classpath. This symbol is required by 'method akka.http.scaladsl.server.RouteResult.routeToFlow'. Make sure that type Flow is in your classpath and check for conflicting dependencies with-Ylog-classpath. A full rebuild may help if 'RouteResult.class' was compiled against an incompatible version of akka.stream.scaladsl. Http().newServerAt("localhost", 8081).bind(route)
为什么我会得到这个错误?一切都和视频中显示的一模一样。是依赖关系导致了这些问题吗?另外,如果我用Scala 2.* 做了一个项目,然后想转换到Scala 3,我会一直面临问题吗?
我是Scala的新手,所以我很感谢所有的帮助!

相关问题