“未知的神器。未解决或编入索引“ scalatest的错误 [英] "Unknown artifact. Not resolved or indexed" error for scalatest

查看:336
本文介绍了“未知的神器。未解决或编入索引“ scalatest的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试修改build.sbt文件以在IntelliJ IDEA中添加scalatest依赖项。控制台中没有错误日志,但我得到了未知工件。未解决或编入索引。当我将鼠标悬停在下划线上时。我该如何解决这个问题?非常感谢提前!

I'm trying to modify the build.sbt file to add scalatest dependencies in IntelliJ IDEA. There's no error log in the console but I got a Unknown artifact. Not resolved or indexed. when I hovered my mouse over the underline. How do I solve this? Many thanks in advance!

这是我用来添加依赖项的行: libraryDependencies + =org.scalatest%scalatest_2.11 %3.0.1%测试

This is the line I used to add dependency: libraryDependencies += "org.scalatest" % "scalatest_2.11" % "3.0.1" % "test"

以下是我的屏幕:

And here is what my screen looks like:

推荐答案

如果您刚刚添加了依赖项,则可能尚未下载。刷新/重新导入项目。

If you just added the dependency, it might not have been downloaded yet. Refresh/reimport the project to do so.

如果已经下载,请在带有警告的行上的IntelliJ中按Alt + Enter,然后选择更新项目解析器'indexesquickfix,然后选择本地缓存索引并单击更新。

If it has already been downloaded, press Alt+Enter in IntelliJ on the lines with the warning and select the "update project resolvers' indexes" quickfix, then select the "local cache" index and click "update".

您可以通过检查已更新列中的日期来验证更新是否有效:

You can verify that the update worked by checking the date in the "Updated" column:

这篇关于“未知的神器。未解决或编入索引“ scalatest的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆