当前位置:首页 » 编程语言

Ignoring unused library classes...java.io.IOException: You have to specify '-keep' options for the s

2015-05-12 16:34 本站整理 浏览(97)

执行Maven Install打包的时候,出现以下错误信息:

Ignoring unused library classes…java.io.IOException: You have to specify ‘-keep’ options for the shrinking step.

[proguard] Ignoring unused library classes...java.io.IOException: You have to specify '-keep' options for the shrinking step.
 [proguard]   Original number of library classes: 19765
 [proguard]   Final number of library classes:    19765
 [proguard] Setting target versions...
 [proguard] 
 [proguard]     at proguard.SeedPrinter.write(SeedPrinter.java:60)
 [proguard]     at proguard.ProGuard.printSeeds(ProGuard.java:265)
 [proguard]     at proguard.ProGuard.execute(ProGuard.java:108)
 [proguard] Printing kept classes, fields, and methods...   at proguard.ProGuard.main(ProGuard.java:538)
 [proguard]
忽略未使用的库类……java.io.IOException: 您必须指定 ‘-保持 ’ 选项缩小范围。

似乎ProGuard的设计原则中, ‘-keep’ 选项是必须使用的,如果你希望对所有的类都进行混淆的话,那就设置一个根本不存在的过虑器吧,例如:

-keep public class com.abcd.* {
    public protected *;
}