我正在学习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的新手,所以我很感谢所有的帮助!
1条答案
按热度按时间juzqafwq1#
发布了问题here并得到了答案:)