eclipse导入项目后编译报错,找不到类,The declared package ××× does not match the expected package

The declared package ××× does not match the expected package

这是项目在编译时根据打包路径找不到源码文件造成的。这个文件夹显示名称为“com.ideepmind”,这个在IDEA中的打包路径可以识别,但在eclipse中,打包路径中的“com.ideepmind”会被认为是com和ideepmind两个文件夹,所以在eclipse中会报包名不符找不到源码的错,这是包名命名不规范造成的,在项目中创建包的时候要逐级创建,把包名合在一起创建就会出现上述问题。其他找不到源码的情况核查包路径和项目的buildPath扫描源码路径即可。
eclipse导入项目后编译报错,找不到类,The declared package ××× does not match the expected package
eclipse导入项目后编译报错,找不到类,The declared package ××× does not match the expected package

eclipse导入项目后编译报错,找不到类,The declared package ××× does not match the expected package
eclipse导入项目后编译报错,找不到类,The declared package ××× does not match the expected package
拆分包名后重构项目即可。