报错信息:
An attempt was made to call the method com.google.common.collect.FluentIterable.append(Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable; but it does not exist. Its class, com.google.common.collect.FluentIterable, is available from the following locations:
jar:file:/C:/Users/XXX/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar!/com/google/common/collect/FluentIterable.class
It was loaded from the following location:
file:/C:/Users/XXX/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar
这个原因是导入jar包的时候,jar包兼容性问题
解决方案:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
</dependencies>
</dependencyManagement>
本文介绍了在遇到Maven项目中由于jar包兼容性导致的错误时,如何进行问题排查和解决,帮助开发者理解并处理此类常见问题。
329

被折叠的 条评论
为什么被折叠?



