vscode-java: The Import Cannot Be Resolved, IntelliJ and VS Code
I’m getting an issue The import com.[company name].taskservice cannot be resolved
on a project. I was getting this issue first and then I ran a mvn idea:idea
and it resolved the dependencies. IntelliJ is showing up as resolved but on the VS Code plugin, the imports still cannot be resolved.
It looks like the mvn idea:idea
generated an additional folder named target
at the same directory level as the pom.xml
and all the additional dependencies get stored there.
Is this part of the IntelliJ import issue #191 ?
Environment
- Operating System: Mac OS X 10.12.6
- JDK version: 1.8.0_131
- Visual Studio Code version: 1.18.0
- Java extension version: 0.14.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 18 (1 by maintainers)
Just clean the workspace directory.
You can clean the workspace directory in the following way:
Open the command palette (F1) select Java: Clean the Java language server workspace click Restart and delete
This is still an issue.
There very much needs to be better support of Maven projects.