Proguard Packaging Error: You have to specify ‘-keep‘ options if you want to write out kept elements with ‘-print

1.Problem description

Using Proguard to obfuscate the code and execute the package command, the following error is reported:

 [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!

2.Solutions

This is because when performing obfuscation in Proguard, you must specify a – keep. If you want to obfuscate all, fill in a nonexistent package name

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


Read More: