且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何告诉ProGuard混淆的类名

更新时间:2023-12-04 08:02:22

有几类出现在code,这样才能保证保持相同的完全限定类名的 如何告诉ProGuard混淆的类名安卓才能够找到他们。如上一个例子都是活动类,它们在清单通过其全名作为一个字符串来定义。如果 ProGuard的是重命名类,然后将Android的无再也无法找到他们。

There are several class that appear in your code that must retain the same fully qualified class name in order for to be able to find them. One example as above are all Activity classes, as they are defined in the manifest by their full name as a String. If proguard were to rename the class then Android would no longer be able to find them.

典型的Proguard的配置将参照Proguard的配置在Android SDK,其中将包括像这样的一些重要的行:

The typical Proguard config will refer to the Proguard config in the Android SDK which will include several important lines like this one:

-keep public class * extends android.app.Activity