【发布时间】:2015-01-09 22:19:48
【问题描述】:
我在我的 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 进行了测试,得到了同样的错误。
【问题讨论】:
-
Afaik GWT 2.7 不支持 Java 8(但我不确定您的问题是否是由此引起的)。
-
我使用的是 2.8 快照。
标签: java javascript gwt java-8 guava