I have a gradle project:
.
|-- src
| |-- java
| | +-- myproj
| | +-- App.java
| +-- test
|-- build.gradle
+-- ...
and App.java
file looks like this:
package myproj;
// ^^^^^^ error message
but VSCode tells me “The declared package "myproj" does not match the expected package "main.java.myproj"”. I know this is related to the file path, but I did not find out how to configure it.
I have installed the Java Extension Pack plug-in, what should I do next?
PS. I don’t want the configuration scheme to be too complicated, I’m just writing a very small program. It is best to be able to complete in setting.json
.
Try to add "main" directory between src and java folder to match gradle folders structure.
Source: https://docs.gradle.org/current/userguide/organizing_gradle_projects.html
Este artigo é coletado da Internet.
Se houver alguma infração, entre em [email protected] Delete.
deixe-me dizer algumas palavras