idea下只能新建Directory,不能新建package,需要修改一下目录的性质,改为源文件 操作:选中文件夹,右键–>new –> Mark Directory As –> Sources Root