The project was not built due to "Project 'ProjectName' is not open.".

在工程编译时报:

The project was not built due to "Project 'ProjectName' is not open.". Fix the problem, then try refreshing this project and building it since it may be inconsistent.

问题原因:在导入多个项目依赖是,项目的“包名和其他项目的包名”重名(即使大小写不同,也不会出现这个问题)。

解决:删除Java Build Path -> Projects 下的工程。

The project was not built due to "Project 'ProjectName' is not open.".