proguard打包报错:You have to specify ‘-keep‘ options if you want to write out kept elements with ‘-print

一、问题描述

使用proguard混淆代码,执行package打包命令,报如下错误:

 [proguard] Error: You have to specify '-keep' options if you want to write out kept elements with '-printseeds'.
 [proguard] Note: you're ignoring all warnings!

二、解决方法

这是因为在proguard里执行混淆时,必须指定一个-keep,如果你想混淆所有的,填一个不存在的包名即可:

<option>-keep public class com.aaaa.* {
  public protected *;
  }
</option>

猜你喜欢

转载自blog.csdn.net/u011781521/article/details/116382126