Why am I getting “Cannot resolve symbol”?

前端 未结 3 1403
伪装坚强ぢ
伪装坚强ぢ 2021-02-14 20:54

I\'ve imported this project before, with no difficulty before. I\'m not sure what has changed.

I click Import Project and selected getting-started-wi

3条回答
  •  我在风中等你
    2021-02-14 21:51

    Make sure that you can compile the project through Maven (that is, via command line) through mvn clean compile.

    If that generates errors, be sure that you have the junit dependency properly scoped in the POM.

    If that doesn't generate errors, then it's IntelliJ that doesn't know where the new libraries are.

    To fix that, simply go to the Maven Projects tab in the main window, and hit the "Generate Sources and Update Folders for All Projects" button. Then, hit "Reimport All Maven Projects", which is next to the previous button.

提交回复
热议问题