gpt4 book ai didi

java - NoSuchMethodError : com. google.common.base.Preconditions.checkArgument(ZLjava/lang/String;J)V

转载 作者:太空狗 更新时间:2023-10-29 22:37:44 30 4
gpt4 key购买 nike

什么 Google Maven 依赖项可以修复此错误:

java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;J)V
at com.google.cloud.storage.spi.v1.HttpStorageRpc.read(HttpStorageRpc.java:487)
at com.google.cloud.storage.BlobReadChannel$1.call(BlobReadChannel.java:127)
at com.google.cloud.storage.BlobReadChannel$1.call(BlobReadChannel.java:124)
at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:94)
at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:54)
at com.google.cloud.storage.BlobReadChannel.read(BlobReadChannel.java:124)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
at java.io.InputStream.read(InputStream.java:101)

代码:

Blob blob = storage.get(blobId);
if(blob.exists()) {
return true;
}

最佳答案

您的 Google Guava 版本太旧 (< 20.0) 或不匹配(多个 jars 版本)。确保您的依赖关系树中没有多个版本。

使用

mvn dependency:tree | less

寻找 Guava 版本。

关于java - NoSuchMethodError : com. google.common.base.Preconditions.checkArgument(ZLjava/lang/String;J)V,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45247193/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com