skip to Main Content

I’m encountering an issue with vscode where it’s unable to resolve imports for some generated libraries located under target/generated-sources/src. Despite reading numerous guides and attempting various solutions such as modifying the pom file, cleaning the Java workspace, and more, nothing seems to be working. Interestingly, IntelliJ handles this properly, but unfortunately, I’m stuck with this problem on vscode. I’ve even tried disabling and re-enabling all extensions, but to no avail.

My vscode version is 1.88.1.

Any suggestions?

2

Answers


  1. Chosen as BEST ANSWER

    I just solved by myself, just opening Classpath configuration using the path of the generated classes

    enter image description here


  2. For Maven project, you can add a dependency by clicking the + icon next to Maven Dependencies node in project view.

    enter image description here

    https://code.visualstudio.com/docs/java/java-project#_dependency-management

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search