2015-02-11 67 views
0

我試圖使用ProGuard優化罐子問題運行proguard的單罐子 - 找不到Java類

我的配置:java -jar proguard.jar @myconfig.pro -verbose

-injars  MyLib-1.0.jar 
    -outjars  MyLib-1.0.proguard.jar 
    -libraryjars retrace.jar 
    -libraryjars guava-18.0.jar 
    -printmapping MyLib.map 

    -keep public class MyLib { 
     public String myPublicCallEntryPoint(java.lang.String); 
    } 

    -keep public class * { 
     public protected *; 
    } 

    -keepclassmembernames class * { 
     java.lang.Class class$(java.lang.String); 
     java.lang.Class class$(java.lang.String, boolean); 
    } 

然後,我運行日誌輸出:

Initializing... 
Note: the configuration refers to the unknown class 'String' 
Note: the configuration refers to the unknown class 'java.lang.String' 
Note: the configuration refers to the unknown class 'java.lang.Class' 
Note: the configuration refers to the unknown class 'java.lang.String' 
Note: the configuration refers to the unknown class 'java.lang.Class' 
Note: the configuration refers to the unknown class 'java.lang.String' 

有什麼辦法可以防止這種事情發生?如何讓proguard識別基類的Java類?

回答

0

問題是我從JRE錯誤rt.jar與從proguard包回溯。