我正在使用Proguard,一切都很好 - 在Android Studio中的apk检查显示模糊的类名 - 即所有片段都被命名为a
,b
等。但我尝试了online decompiler(它使用Jadx),这个工具可以将原始类名重新映射到混淆的类名。似乎我的apk中的class.dex
文件仍然包含有关原始名称的一些信息。有没有办法摆脱它?
-optimizations !code/allocation/variable
-overloadaggressively
-dontpreverify
-verbose
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes LineNumberTable
-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
-dontnote okhttp3.**
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.** { *; }
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames class * implements android.os.Parcelable
-keepclassmembers class * implements android.os.Parcelable {
public static final *** CREATOR;
}
-keep @interface android.support.annotation.Keep
-keep @android.support.annotation.Keep class *
-keepclasseswithmembers class * {
@android.support.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
@android.support.annotation.Keep <methods>;
}
-keep @interface com.google.android.gms.common.annotation.KeepName
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keep @interface com.google.android.gms.common.util.DynamiteApi
-keep public @com.google.android.gms.common.util.DynamiteApi class * {
public <fields>;
public <methods>;
}
-dontwarn android.security.NetworkSecurityPolicy
-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }