gpt4 book ai didi

java - Dagger : java. lang.NoSuchMethodError : com. google.common.collect.SetMultimap.forEach(Ljava/util/function/BiConsumer;)V

转载 作者:行者123 更新时间:2023-11-30 00:39:25 24 4
gpt4 key购买 nike

我正在尝试使用新的 dagger android 功能,但是我似乎在编译期间遇到了这个错误:

 org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileStagingUsaDebugJavaWithJavac'.
...
Caused by: java.lang.NoSuchMethodError: com.google.common.collect.SetMultimap.forEach(Ljava/util/function/BiConsumer;)V
at dagger.android.processor.AndroidMapKeyValidator.process(AndroidMapKeyValidator.java:114)
at com.google.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:329)
at com.google.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:182)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
... 97 more

有没有其他人看到这个错误,有解决方法吗?

最佳答案

哎呀,看来我的 Guava 版本有误(19 应该是 20)。

关于java - Dagger : java. lang.NoSuchMethodError : com. google.common.collect.SetMultimap.forEach(Ljava/util/function/BiConsumer;)V,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42771286/

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