gpt4 book ai didi

java - Guava 18 无法使用 GWT 2.8Snapshot 和 Java 8 进行编译

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:21:55 24 4
gpt4 key购买 nike

我在我的 gwt.xml 模块中使用并放置

guava-18.0.jar
guava-gwt-18.0.jar

Tracing compile failure path for type 'com.google.common.collect.Collections2'
[ERROR] Errors in 'com/google/common/collect/Collections2.java'
[ERROR] Line 201: The method and(Predicate<capture#14-of ? super E>, Predicate<capture#15-of ?>) is undefined for the type Collections2.FilteredCollection<E>
[ERROR] Line 206: The method and(Predicate<capture#16-of ? super E>, Predicate<capture#17-of ?>) is undefined for the type Collections2.FilteredCollection<E>
Tracing compile failure path for type 'com.google.common.collect.Maps'
[ERROR] Errors in 'com/google/common/collect/super/com/google/common/collect/Maps.java'
[ERROR] Line 2244: The method and(Predicate<capture#263-of ? super Map.Entry<K,V>>, Predicate<capture#264-of ? super Map.Entry<K,V>>) is undefined for the type Predicates
[ERROR] Line 2343: The method and(Predicate<capture#265-of ? super Map.Entry<K,V>>, Predicate<capture#266-of ? super Map.Entry<K,V>>) is undefined for the type Predicates
Tracing compile failure path for type 'com.google.common.collect.Multimaps'
[ERROR] Errors in 'com/google/common/collect/super/com/google/common/collect/Multimaps.java'
[ERROR] Line 1691: The method and(Predicate<capture#83-of ? super K>, Predicate<capture#84-of ? super K>) is undefined for the type Predicates
[ERROR] Line 1954: The method and(Predicate<capture#105-of ? super Map.Entry<K,V>>, Predicate<capture#106-of ? super Map.Entry<K,V>>) is undefined for the type Predicates
[ERROR] Line 1735: The method and(Predicate<capture#87-of ? super K>, Predicate<capture#88-of ? super K>) is undefined for the type Predicates
[ERROR] Line 1779: The method and(Predicate<capture#91-of ? super K>, Predicate<capture#92-of ? super K>) is undefined for the type Predicates
[ERROR] Line 1940: The method and(Predicate<capture#103-of ? super Map.Entry<K,V>>, Predicate<capture#104-of ? super Map.Entry<K,V>>) is undefined for the type Predicates
[ERROR] Aborting compile due to errors in some input files

编辑:Google GWT-Contributors 组中有一个讨论:https://groups.google.com/forum/#!topic/google-web-toolkit-contributors/zYUfanL8zwM

这里是这个问题的问题:http://code.google.com/p/google-web-toolkit/issues/detail?id=9036

这个问题有解决方法吗?

编辑:我用 Guava 19SNAPSHOT 进行了测试,得到了同样的错误。

最佳答案

这是一个 known issue使用 GWT 及其使用的 JDT 版本。

错误报告中给出的修复是升级jdt版本,运行update-jdt.py,更新dev/build.xml指向新版本。

或者,您可以尝试不同版本的 guava,或者开始从 guava 中删除不起作用的方法/类。

或者您可以等到更新版本的 gwt 发布,这将解决这些问题。

关于java - Guava 18 无法使用 GWT 2.8Snapshot 和 Java 8 进行编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27870181/

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