我不会混淆我的所有项目,而只是最关键的课程.
如何编写proguard文件以排除所有项目并仅混淆单个类或单个包?
如何编写proguard文件以排除所有项目并仅混淆单个类或单个包?
解决方法
请在downvote之前阅读答案.你需要 !在你上课之前.
看看Proguard Manual:Keep option part和Android example.
示例:
-keeppackagenames com.vtcmobile { ! com.yourpackage.CategoryParser // keep package com.vtcmobile excluded class com.vtcmobile.CategoryParser }
编辑:使用
-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.