Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98741

VS Code: The declared package "controller" does not match the expected package ""

$
0
0

So, I have checked some other threads that are about this topic, such as the following:

Eclipse says package declaration does not match expected package ""

The declared package test does not match the expected package

libgdx: The declared package does not match the expected package ""

But they all deal with Eclipse (or Eclipse + Maven), and I am just using VS Code without all the fancy capabilities of an IDE or a package manager.

As the title suggests, I am getting the message: [Java] The declared package "controller" does not match the expected package ""

I get this message for every single file that I attempt to give a package using the syntax:

package myPackageName;

even if the file in question is defiantly in the right folder. This problem only occurs as a visual, i.e. everything compiles fine using javac. I have been dealing with it ever since I started using VS Code for my Java Projects.

How do I make the red squigglies and the red lettering in the file explore tab go away in the case of perceived package errors?? It drives me nutty, I can't quickly find the files that actually have errors in my project because everything is marked red except the Driver.

Here is a picture: picture

[edit] Got rid of the unrelated compile time errors So you can see it compiles.


Viewing all articles
Browse latest Browse all 98741

Latest Images

Trending Articles



Latest Images