ProGuard保持课堂不起作用

时间:2016-06-17 08:25:38

标签: java proguard obfuscation

我有一个jar文件,我想用ProGuard对其进行模糊处理。将所有库放入jar文件中,我想从混淆中排除库。当我尝试混淆时,我收到以下错误:

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)

我的配置是这样的;

-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[]);  

我无法找出我的错误,任何帮助都会很棒!

1 个答案:

答案 0 :(得分:0)

看起来guava库作为libraryjar缺失了。您是否已将所有依赖库打包到文件celron-build.jar中?如果没有,那么您需要将它们指定为

-libraryjars path/to/library.jar