Go to Project Structure - Modules - Source Folders and find the target/generated-sources/antlr4/com/mycompany
- click Edit properties and set Package prefix to com.mycompany
.
This is exactly the reason why we can set Package prefix on source dirs.
Different but related problem here