2016-06-17 11 views
0

Ich habe eine JAR-Datei und ich möchte sie mit ProGuard verschleiern. Alle Bibliotheken in JAR-Datei und ich möchte Bibliotheken von der Verschleierung ausschließen. Wenn ich versuche zu verschleiern, erhalte ich die folgende Fehlermeldung:ProGuard keep class funktioniert nicht

Unexpected error while performing partial evaluation: 
    Class  = [com/google/common/cache/LongAddables] 
    Method  = [<clinit>()V] 
    Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [com/google/common/cache/LongAddables$2] (with 1 known super classes) and [com/google/common/cache/LongAddables$1] (with 1 known super classes)) 
Error: Can't find common super class of [com/google/common/cache/LongAddables$2] (with 1 known super classes) and [com/google/common/cache/LongAddables$1] (with 1 known super classes) 

Meine Konfiguration ist so;

-injars  E:\project\celrond\out\artifacts\celrond-build.jar 
-outjars  E:\project\celrond\out\artifacts\celrond-build_obf.jar 

-keep class com.google.** { *; } 
-keep class org.h2.** { *; } 
-keep class org.apache.** { *; } 
-keep class com.sun.** { *; } 
-keep class com.j256.** { *; } 
-keep class org.eclipse.** { *; } 
-keep class com.ibm.** { *; } 
-keep public class celrond.MyMain { 
    public static void main(java.lang.String[]); 

Ich konnte meinen Fehler nicht finden, jede Hilfe wäre großartig!

Antwort

0

Es scheint, dass die Guava-Bibliothek als Libraryjar fehlt. Haben Sie alle abhängigen Bibliotheken in die Datei celron-build.jar gepackt? Wenn nicht, dann müssen Sie sie als

-libraryjars path/to/library.jar 
+0

angeben Ich habe alle abhängigen Bibliotheken in meine JAR-Datei verpackt. Ich kann mein Programm mit dem Befehl 'java -jar celron-build.jar' problemlos ausführen. – Dreamcatcher

+0

Können Sie überprüfen, ob die Klasse com.google.common.base.Supplier vorhanden ist? Sie können auch Warnungen von ProGuard veröffentlichen, die auf die Ursache des Problems hinweisen. –