如何解决scala中的导入冲突?
发布时间:2020-12-16 18:32:08 所属栏目:安全 来源:网络整理
导读:我使用“console-project”命令从sbt启动了这个 shell. scala settingsconsole:24: error: reference to settings is ambiguous;it is imported twice in the same scope byimport Keys._and import settings settings ^ 如何让shell显示设置对象,而不是Keys
我使用“console-project”命令从sbt启动了这个
shell.
scala> settings <console>:24: error: reference to settings is ambiguous; it is imported twice in the same scope by import Keys._ and import settings settings ^ 如何让shell显示设置对象,而不是Keys.settings? 解决方法
假设您自己导入了Keys._和设置,您可以重命名Keys中的设置,如下所示:
import Keys.{settings => keySettings,_} (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |