AndroidStudio自带的混淆配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AndroidStudio自带的混淆配置相关的知识,希望对你有一定的参考价值。

参考技术A

###########################以下是androidStudio自带的混淆配置协议###############################

-dontusemixedcaseclassnames

-dontskipnonpubliclibraryclasses

-verbose

-dontoptimize

-dontpreverify

-keepattributes Annotation
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class *
native <methods>;

-keepclassmembers public class * extends android.view.View
void set ( * );
*** get
();

-keepclassmembers class * extends android.app.Activity
public void *(android.view.View);

-keepclassmembers enum *
public static **[] values();
public static ** valueOf(java.lang.String);

-keepclassmembers class * implements android.os.Parcelable
public static final android.os.Parcelable$Creator CREATOR;

-keepclassmembers class * .R$
public static <fields>;

-dontwarn android.support.**

-keep class android.support.annotation.Keep

-keep @android.support.annotation.Keep class * *;

-keepclasseswithmembers class *
@android.support.annotation.Keep <methods>;

-keepclasseswithmembers class *
@android.support.annotation.Keep <fields>;

-keepclasseswithmembers class *
@android.support.annotation.Keep <init>(...);

###########################以下是需要手动的混淆配置协议###############################

-libraryjars "C:\\Program Files\\Java\\jre1.8.0_151\\lib\\rt.jar"

-optimizationpasses 5

-dontusemixedcaseclassnames

-ignorewarnings

-keep class com.zhuge.analysis.stat.ZhugeParam
*;

-keep class com.zhuge.analysis.listeners.ZhugeInAppDataListener
*;

以上是关于AndroidStudio自带的混淆配置的主要内容,如果未能解决你的问题,请参考以下文章

Android--混淆配置

Android--混淆配置

关于AndroidStudio混淆配置,简单的整理(转)

Android Studio 配置快速生成模板代码

Android Studio导出Jar包并混淆

Moblink问题排查流程