Enable Proguard for only two packages in large Android application

荒凉一梦 提交于 2019-12-01 22:18:44

The correct syntax is a comma-separated list without any parentheses:

-keep class !com.google.zxing.**,!com.example.app.** { *; }

See the ProGuard manual > Usage > Filters.

Note that this single line already implies the two other lines for interfaces and enums. You can imply the -keep options for all subpackages by not letting the last wildcard match subpackages:

-keep class !com.google.zxing.**,!com.example.app.* { *; }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!