播放要求隐式应用 Akka 代码,即使它是导入的

Play asking for implicit application on Akka code even though it's imported

使用播放 2.4.x。我的代码如下所示:

import play.api.Play.current

val linkedinParse = Akka.system.actorOf(Props[LinkedinParse], name = "linkedinParse") 

Play 产生编译器错误:

You do not have an implicit Application in scope. If you want to bring the 
current running Application into context, just add import play.api.Play.current

即使我有那个导入

这有几个可能的原因。最有可能的是你在范围内有其他称为 current 的东西......尝试通过显式传递隐式参数来脱糖(你总是可以这样做,这可能是调试隐式解析问题的好方法):

Akka.system(current).actorOf(...)

如果不能编译,则隐式解析将出于同样的原因不起作用。