添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

A fast but sub-optimal alternative would be simply keeping all interfaces with "-keep interface *".

Update in 2016/3/25 To keep all methods in the Interface .

-keep interface * {
  <methods>;

Update in 2017/7/24 The class file of Java8 could store metadata for reflection on method parameters, include Interface. Proguard v5.3 could keep these metadata with following options:

-keepattributes MethodParameters

I run the testing before I update the answer. It could keep all methods and parameters. If you are talking about the parameter variable names. There is no solution now, because the parameter variable names in not preserving in compilded class too. Please refer Preserving parameter/argument names in compiled java classes – Beck Yang Mar 28, 2016 at 14:39

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.