保持库 class 不受 ProGuard 影响

Keep library class untouched by ProGuard

如何告诉 ProGuard 不要以任何特定方式更改 class/package?

不优化,不缩小,不混淆,什么都不做,只看不摸?

-keep class com.example.** { *; }好像缩小了private/unusedconstructors/methods

我认为你应该在你的配置文件中尝试 -dontoptimize 和 -dontshrink,然后将 allowshrinking 和 allowoptimization 与你的 keep 选项一起使用,只要你希望它与你的 class/package.

一起应用