概述
今天记录一下遇到的问题及解决方法
报错:Unable to import maven project: See logs for details
-
新项目用IDEA打开时,引入依赖时总是会报错
-
查看日志
看到报错如下: Unable to create injector, see the following errors
2020-04-30 14:37:55,048 [11620846] ERROR - #org.jetbrains.idea.maven - com.google.inject.CreationException: Unable to create injector, see the following errors:
1) No implementation for org.apache.maven.model.path.PathTranslator was bound.
while locating org.apache.maven.model.path.PathTranslator
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound.
while locating org.apache.maven.model.path.UrlNormalizer
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2 errors
java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors:
1) No implementation for org.apache.maven.model.path.PathTranslator was bound.
while locating org.apache.maven.model.path.PathTranslator
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound.
while locating org.apache.maven.model.path.UrlNormalizer
for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source)
at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350)
网上说 maven 版本不兼容的问题导致,看了下我的 maven 是 3.6.2 的
所以打算换 maven 版本,换到 3.6.0 试试看
- 更换 maven
去 apache 官网下载需要的版本
https://maven.apache.org/download.cgi
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-EekvYzyS-1596771366838)(http://47.113.122.133:8090/upload/2020/4/image-80a8a12cc7de432892cbe332a6f15e8e.png)]
下载的话选择下方的 archives
选择 3.6.0 版本
选择 binaries/
选择 apache-maven-3.6.0-bin.zip ,然后下载
下载完成之后,修改 IDEA 的 maven 配置
重新 Reimport,无报错!解决~
关于 3.6.2 的版本为什么不兼容,换到低版本就可以了,网上也没具体的说法,我也懒得深究了,如果有需要再深入了解吧。
最后
以上就是热情紫菜为你收集整理的IDEA 报错:Unable to import maven project: See logs for details 解决方法记录的全部内容,希望文章能够帮你解决IDEA 报错:Unable to import maven project: See logs for details 解决方法记录所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复