如何混淆只有几级或单包? [英] How to obfuscate only few class or a single package?

查看:245
本文介绍了如何混淆只有几级或单包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不会混淆我的所有项目,但只是大多是重点班。 如何写ProGuard的文件,排除所有的项目和混淆只有一个班或一个包?

I would not obfuscate all my project but just the mostly key class. how to write the proguard file to exclude all project and obfuscate only a single class or a single package ?

推荐答案

请阅读downvote之前的答案。你需要 !前类。

Please read the answer before downvote. You need ! before your class.

看看 Proguard的手册保存选项部分,的Andr​​oid例如

例如:

 -keeppackagenames com.vtcmobile {
    ! com.yourpackage.CategoryParser // keep package com.vtcmobile excluded class com.vtcmobile.CategoryParser
    }

编辑:用

-keeppackagenames [package_filter]       指定不进行模糊处理指定的包名。可选的过滤器是一个逗号分隔的包名称列表。包名可以   包含哪些内容?,*,**和通配符,而且他们可以通过pceded $ P $!    否定符。只有混淆时适用。

-keeppackagenames [package_filter] Specifies not to obfuscate the given package names. The optional filter is a comma-separated list of package names. Package names can contain ?, *, and ** wildcards, and they can be preceded by the ! negator. Only applicable when obfuscating.

这篇关于如何混淆只有几级或单包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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