首页 > 代码库 > The declared package "com.dao" does not match the expected package "src.com.dao"

The declared package "com.dao" does not match the expected package "src.com.dao"

  今天把项目代码上传到svn后出现例如以下错误:The declared package "com.dao" does not match the expected package "src.com.dao"

解决方式是:选中项目右击选择 Build Path --> 选择 Configure Build Path -->选择“Source”标签,把“项目Name”改为“项目Name/src”。问题解决!(我又一次编译项目也没实用)

操作截图例如以下:

技术分享

The declared package "com.dao" does not match the expected package "src.com.dao"