The declared package does not match the expected package时间:2023-03-09 07:20:54 The declared package does not match the expected package。 1、选中项目右击选择Build Path-->再选择Configure Build Path; 2、选择“Source”标签,把“***”改为“***/src”,ok。(***代表你工程路径)