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

时间:2017-03-13 18:52:12

标签: java android dagger-2

我试图使用新的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

是否有其他人看到此错误,是否有解决方法?

1 个答案:

答案 0 :(得分:1)

哎呀看起来我错了版本的高瓦(19应该是20)。