I have a problem with the guava 10.0 jar found in maven central:
Everything works fine (I'm using it on Android), but when I run
ProGuard on the jars, it fails to process guava-10.0.jar:
[2011-10-06 18:17:57 - combined_app] Proguard returned with error code
1. See console
[2011-10-06 18:17:57 - combined_app] Warning:
com.google.common.collect.MinMaxPriorityQueue: can't find referenced
field 'int UNSET_EXPECTED_SIZE' in class
com.google.common.collect.MinMaxPriorityQueue$Builder
[2011-10-06 18:17:57 - combined_app] You should check if you
need to specify additional program jars.
[2011-10-06 18:17:57 - combined_app] Warning: there were 1 unresolved
references to program class members.
[2011-10-06 18:17:57 - combined_app] Your input classes
appear to be inconsistent.
[2011-10-06 18:17:57 - combined_app] You may need to
recompile them and try again.
[2011-10-06 18:17:57 - combined_app] Alternatively, you may
have to specify the options
[2011-10-06 18:17:57 - combined_app]
'-dontskipnonpubliclibraryclasses' and/or
[2011-10-06 18:17:57 - combined_app]
'-dontskipnonpubliclibraryclassmembers'.
[2011-10-06 18:17:57 - combined_app] java.io.IOException: Please
correct the above warnings first.
[2011-10-06 18:17:57 - combined_app] at
proguard.Initializer.execute(Initializer.java:308)
[2011-10-06 18:17:57 - combined_app] at
proguard.ProGuard.initialize(ProGuard.java:210)
[2011-10-06 18:17:57 - combined_app] at
proguard.ProGuard.execute(ProGuard.java:85)
[2011-10-06 18:17:57 - combined_app] at
proguard.ProGuard.main(ProGuard.java:499)
The jar SHA1 Checksum matches with the one in maven central.
I've tried to rebuild guava, so I cloned the git repo, checked out
v10.0 and executed mvn install. It was not successful using OpenJDK
1.6.0_22:
/home/szabi/aaa/guava-libraries/guava/src/com/google/common/collect/SortedMaps.java:[219,48]
incompatible types; no instance(s) of type variable(s) K,V exist so
that java.util.TreeMap<K,V> conforms to java.util.SortedMap<K,V>
found : <K,V>java.util.TreeMap<K,V>
required: java.util.SortedMap<K,V>
/home/szabi/aaa/guava-libraries/guava/src/com/google/common/collect/SortedMaps.java:[220,49]
incompatible types; no instance(s) of type variable(s) K,V exist so
that java.util.TreeMap<K,V> conforms to java.util.SortedMap<K,V>
found : <K,V>java.util.TreeMap<K,V>
required: java.util.SortedMap<K,V>
/home/szabi/aaa/guava-libraries/guava/src/com/google/common/collect/SortedMaps.java:[222,44]
incompatible types; no instance(s) of type variable(s) K,V exist so
that java.util.TreeMap<K,V> conforms to java.util.SortedMap<K,V>
found : <K,V>java.util.TreeMap<K,V>
required: java.util.SortedMap<K,V>
/home/szabi/aaa/guava-libraries/guava/src/com/google/common/collect/SortedMaps.java:[224,23]
incompatible types; no instance(s) of type variable(s) K,V exist so
that java.util.TreeMap<K,V> conforms to
java.util.SortedMap<K,com.google.common.collect.MapDifference.ValueDifference<V>>
found : <K,V>java.util.TreeMap<K,V>
required: java.util.SortedMap<K,com.google.common.collect.MapDifference.ValueDifference<V>>
Switching to Sun java 1.6.0_26 solves this problem and the build is
successful. Also, the resulting jar can be processed using ProGuard.
So, the question is, are these problems expected? I can create a new
issue if it's any use.
Apart from this small glitch, it's an awesome work you do with guava!
Best regards,
Szabolcs Berecz
Everything works fine (I'm using it on Android), but when I run
ProGuard on the jars, it fails to process guava-10.0.jar:
[2011-10-06 18:17:57 - combined_app] Warning:
com.google.common.collect.MinMaxPriorityQueue: can't find referenced
field 'int UNSET_EXPECTED_SIZE' in class
com.google.common.collect.MinMaxPriorityQueue$Builder