我使用谷歌番石榴V13.0但是当我运行含有tryFind代码JUnit测试,我得到这个消息:
java.lang.NoSuchMethodError: com.google.common.collect.Iterables.tryFind(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Lcom/google/common/base/Optional;
这似乎只与JUnit测试发生在生产代码运行没有问题。 我使用的IntelliJ IDEA v11.1.3及可以导航到番石榴JAR文件找到tryFind在com.google.common.collect.Iterable.class。
我已经看到了类似的帖子,但我不知道如何这涉及到JUnit的。 什么我的问题可能是任何想法?