eclipse中代码开头提示错误 Must declare a named package because this compilation unit is associated to the named module ‘MyProject’ 解决方法 似乎是新版的eclipse才会出现的问题,在新建class的时候需要对包定义。 最简单粗暴的方式是把 module-info.java 删除。 其他方法我也做不好,希望大佬教教我 T-T 每天都被自己菜醒。