Using "dontwarn" in proguard

I use proguard successfully, but whenever I add an external library (those that belong to the ad), proguard fails with "cannot find the link ... etc.". I tried a lot of combinations like libraryjars, injars ... etc, but no luck.

Then I used the "-dontwarn" option in the external file, and everything worked magically. Is it bad to do? I mean, is there a problem that I do not encounter processing external cans using this attribute?

thanks

+6
source share
1 answer

For warnings of missing third-party classes, the -ignorewarnings or -dontwarn are probably fine. If the code is already running in debug mode, this means that the missing classes listed are never used. You can then tell ProGuard to continue processing the code.

For warnings about missing classes, fields, or runtime methods, you should create against the fairly recent Android runtime specified in project.properties . You can target an earlier version of Android in AndroidManifest.xml .

See the ProGuard Guide> Troubleshooting:

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

+7
source

Source: https://habr.com/ru/post/953459/


All Articles