我怎样才能排除混淆外部.jar通过Proguard的(Android项目)? [英] How can I exclude external .jar from obfuscation by Proguard (Android project)?

查看:463
本文介绍了我怎样才能排除混淆外部.jar通过Proguard的(Android项目)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我出口的Andr​​oid项目proguard.cfg,所有引用.jar文件模糊处理为好。我怎么能排除一些的.jar文件的混淆?

When I export android project with proguard.cfg, all referenced .jar files are obfuscated as well. How can I exclude some of that .jars from obfuscation?

推荐答案

如果您不希望编辑Ant脚本,您可以添加-keep选项proguard.cfg为类的外部罐。例如:

If you don't want to edit the Ant script, you can add -keep options to proguard.cfg for the classes in those external jars. For instance:

-keep class othercode.** { *; }

或者用含有否定符常规EX pression:

Or with a regular expression containing a negator:

-keep class !mycode.** { *; }

标准Ant脚本仍然会合并所有引用的罐子在单输出罐子虽然。

The standard Ant script will still merge all referenced jars in the single output jar though.

这篇关于我怎样才能排除混淆外部.jar通过Proguard的(Android项目)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆