为什么我会收到“无法解析符号”? [英] Why am I getting "Cannot resolve symbol"?
问题描述
之前我已经导入了这个项目,没有遇到任何困难。我不确定发生了什么变化。
I've imported this project before, with no difficulty before. I'm not sure what has changed.
我点击导入项目
并选择获取-started-with-selenium
( http://github.com / ddavison / getting-started-with-selenium )这是一个Maven项目和一个旧的Eclipse项目。我点击了目录,然后在选择库或其他任何内容中,我选择 Maven
。
I click Import Project
and selected getting-started-with-selenium
(http://github.com/ddavison/getting-started-with-selenium) which is a Maven project, and an old Eclipse project. I clicked the directory, then in the "Select libraries" or whatever, i selected Maven
.
我是改变了我的构建路径以正确匹配...
I've changed my build path to match correctly...
src/
main/
java/ <-- source folder.
tests/
java/ <-- tests folder.
但是,我得到无法解决''之后''的符号
即使在maven库中,我也能清楚地看到它。
But yet, I get "Cannot resolve symbol 'After'"
Even though in the maven libraries, I see it clearly.
让我知道是否需要任何其他信息。
Let me know if there is any additional information needed.
推荐答案
确保如果JUnit被声明为< ; scope> test< / scope>
,你的测试类在 src / test
中,否则它将无法看到依赖项。
Make sure that if JUnit is declared as <scope>test</scope>
, that your test class is in src/test
, otherwise it won't be able to see the dependency.
这篇关于为什么我会收到“无法解析符号”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!