The declared package does not match the expected package Eclipse


⛔️ The declared package "com.example.package1" does not match the expected package "com.xyz.package1"


When you create an Android Application you define the package name (as java reverse domain name conventions: com.example.myapp) and your project folder (directory) must have that package name, so should be the package statements for java files what reside inside this folder.


If there is a mismatch you would get this error message.