使用的idea版本是2019.2.1,以及MAVEN版本是3.6.3。
同步一直出現問題,查看日志后報錯
java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors
......
查了一下是因為idea和maven版本不兼容,將maven版本降至3.6.0完美解決。
maven降至3.6.0 1. 刪除maven3.6.3 2.下載3.6.0 https://maven.apache.org/download.cgi 進去后找到Previous Releases 點擊archives 點擊3.6.0 下載8.7M的.zip文件。
之后修改環境變量,將3.6.3配置為3.6.0
之后修改idea配置,點擊File->setting->build->build tools->moven
修改 Maven home directory: %MAVEN_HOME%
修改 User settings file: %MAVEN_HOME%\conf\settings.xml (勾選overide后可以選擇)
Local repository 會被自動識別。
另外,idea自動下載
點擊File -> Setting ->Maven ->Importing:選中Automatically download中的兩個多選框Sources和Documentation打上對勾。