Using “dontwarn” in proguard

后端 未结 1 950
不思量自难忘°
不思量自难忘° 2021-01-12 10:38

I use proguard successfully but whenever I add external library (those that belongs to advertising) proguard fails with \"can\'t find reference ...etc\". I tried many combin

相关标签:
1条回答
  • 2021-01-12 11:23

    For warnings about missing third-party classes, the options -ignorewarnings or -dontwarn are probably fine. If the code already works in debug mode, it means that the listed missing classes are never used. You can then tell ProGuard to proceed processing the code anyway.

    For warnings about missing Android runtime classes, fields, or methods, you should build against a sufficiently recent Android runtime, specified in project.properties. You can still target an older Android runtime in AndroidManifest.xml.

    See the ProGuard manual > Troubleshooting:

    • Warning: can't find referenced class
    • Warning: can't find referenced field/method '...' in library class ...

    Note that you should not add -injars or -libraryjars options to your configuration, since the standard Ant/Eclipse/Gradle build processes automatically specify these for you.

    0 讨论(0)
提交回复
热议问题