Android 混淆实例

# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
-dontwarn
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose


# Optimization is turned off by default. Dex does not like  code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
-dontoptimize
-dontpreverify
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.


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


# keep the 3-rd libs (Andorid Support, GSON, ZXing, Baidu Map)
-keep class android.support.v4.app.** { *; }
-keep class com.google.gson.** { *; }
-keep class com.baidu.mapapi.** { *; }
-keep class com.baidu.platform.** { *; }
-keep class com.baidu.vi.** { *; }
-keep class com.baidu.location.** { *; }
-keep class vi.com.gdi.bgl.android.java.** { *; }
-keep class org.apache.http.** { *; }
-keep class com.hrbcb.Clientjar.tools.** { *; }
-keep class org.json.** { *; }
-keep class com.android.volley.** { *; }
-keep class com.hrbcb.consumerloans.js.** { *; }
-keep public class * extends  com.hrbcb.Clientjar.net.packet.BaseEntity
-keep class com.hrbcb.consumerloans.netHelper.**{*;} 
 -keep class com.hrbcb.consumerloans.bean.**{*;}
 
-dontwarn org.apache.http.**
#-dontwarn org.apache.http.**
-keepclassmembers class * {
   public <init>(org.json.JSONObject);
}
-keep public class com.hrbcb.studentloans.R$*{
public static final int *;
}
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}
#-libraryjars libs/android-support-v4.jar
#-libraryjars libs/faceppsdk_min.jar
#-libraryjars libs/gson-2.2.2.jar
#-libraryjars libs/HRBankClientJar0421.jar
#-libraryjars libs/livenessdetection_v2.3.3.jar
#-libraryjars libs/locSDK_5.2.jar
#-libraryjars libs/umeng-analytics-v5.5.3.jar
#-libraryjars libs/zip4j_1.3.2.jar


# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
    native <methods>;
}


# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
   void set*(***);
   *** get*();
}


# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}


# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}


-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}


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


# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version.  We know about them, and they are safe.
-dontwarn android.support.**


##---------------Begin: proguard configuration for Gson  ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.


# Explicitly preserve all serialization members. The Serializable interface
# is only a marker interface, so it wouldn't save them.
-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
    public <fields>;
}


-keepclassmembers class com.google.gson.** {*;}




-keepattributes Signature


# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }


# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }


##---------------End: proguard configuration for Gson  ----------
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值