java.lang.NoSuchMethodError: #39;void com.google.common.base.Preconditions.checkArgument(boolean, java.lang.String, java.lang.Object)(Java.lang.NoSuchMethodError:#39;com.google.common.base.Preconditions.checkArgument(boolean,无效))
问题描述
清理MVN时出现以下错误
xxxxxx@mxxxxx:~/test/toto$ mvn clean
---------------------------------------------------
Exception in thread "main" java.lang.NoSuchMethodError: 'void com.google.common.base.Preconditions.checkArgument(boolean, java.lang.String, java.lang.Object)'
at com.google.inject.Key.ensureRetainedAtRuntime(Key.java:341)
at com.google.inject.Key.strategyFor(Key.java:335)
at com.google.inject.Key.get(Key.java:219)
at org.eclipse.sisu.wire.ParameterKeys.<clinit>(ParameterKeys.java:28)
at org.eclipse.sisu.wire.DependencyAnalyzer.<init>(DependencyAnalyzer.java:93)
at org.eclipse.sisu.wire.ElementAnalyzer.<init>(ElementAnalyzer.java:104)
at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:74)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:137)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206)
at org.apache.maven.cli.MavenCli.container(MavenCli.java:636)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:282)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
我认为问题在于番石榴版本仍然在guava-19.0.jar上。我已将
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
</dependency>
在pom.xml中,但我无法下载它,因为MVN已损坏
有谁知道吗?谢谢
推荐答案
我找到了解决方案,只需卸载/安装maven
sudo apt-get purge --auto-remove maven
sudo apt install maven
这篇关于Java.lang.NoSuchMethodError:';com.google.common.base.Preconditions.checkArgument(boolean,无效)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Java.lang.NoSuchMethodError:';com.google.common.base.Preconditions.checkArgument(boolean,无效)
基础教程推荐
- Java 中保存最后 N 个元素的大小受限队列 2022-01-01
- Spring Boot Freemarker从2.2.0升级失败 2022-01-01
- 如何对 HashSet 进行排序? 2022-01-01
- 由于对所需库 rt.jar 的限制,对类的访问限制? 2022-01-01
- 在螺旋中写一个字符串 2022-01-01
- 如何使用 Eclipse 检查调试符号状态? 2022-01-01
- 如何使用 Stream 在集合中拆分奇数和偶数以及两者的总和 2022-01-01
- 如何在不安装整个 WTP 包的情况下将 Tomcat 8 添加到 Eclipse Kepler 2022-01-01
- 如何强制对超级方法进行多态调用? 2022-01-01
- 首次使用 Hadoop,MapReduce Job 不运行 Reduce Phase 2022-01-01