0
我有一個實現Compartor一類,它覆蓋比較功能:的Java Proguard的和INT比較
import java.util.Comparator;
public class ScoreComparator implements Comparator<Score>
{
@Override
public int compare(Score s1, Score s2)
{
return Integer.compare(s2.score, s1.score);
}
}
當我編譯使用ProGuard我收到以下錯誤:
can't find referenced method 'int compare(int,int)' in class java.lang.Integer You should check if you need to specify additional program jars. there were 1 unresolved references to program class members. Your input classes appear to be inconsistent. You may need to recompile them and try again. Alternatively, you may have to specify the option '-dontskipnonpubliclibraryclassmembers'.
所以我明顯添加了該選項。但是,我得到了同樣的錯誤。
那麼應該在proguard配置中添加什麼額外的選項來消除這個錯誤呢?
錯誤的哪部分你不明白?告訴我們你的代碼。 – SLaks
這就是我得到的錯誤... int compare(int,int) –
你的proguard配置是什麼?在我的測試中,它是可以的。 –