問題
Idea新建Maven項目,沒法新建package,不能識別module結構體。
java
![](http://static.javashuo.com/static/loading.gif)
解決方案
這應該算是idea的一個bug了。app
1.右鍵項目-->Open Module Settings
![](http://static.javashuo.com/static/loading.gif)
2.選中Modules,若是沒有項目,選中+號 --> import module --> 將項目導入,點擊完成--一路next,到最後如圖所示
![](http://static.javashuo.com/static/loading.gif)
3.加入Module後,可是想要加package的話,須要告訴idea哪一個文件夾是源代碼文件夾,哪一個文件夾是靜態文件夾。好比我這個,選中java文件夾-->選擇Sources -->apply。
![](http://static.javashuo.com/static/loading.gif)
4.再來右鍵,問題解決
![](http://static.javashuo.com/static/loading.gif)
end
![](http://static.javashuo.com/static/loading.gif)
您的點贊和關注是對我最大的支持,謝謝!