How to use Java annotations to guide Android's Proguard?

前端 未结 2 1745
慢半拍i
慢半拍i 2021-02-02 01:39

When using Proguard with Android, methods that are only invoked via reflection (e.g., callbacks defined in onClick XML attributes) are erroneously stripped out.

One solu

2条回答
  •  花落未央
    2021-02-02 02:08

    You can retrieve annotations.jar and annotations.pro from an official ProGuard release. You should then be able to use annotations as discussed here

    All the necessary options can go in proguard.cfg.

提交回复
热议问题