您好,登錄后才能下訂單哦!
1.Gson混淆
## ---------------------------------- ## ########## Gson混淆 ########## ## ---------------------------------- -keepattributes Signature -keep class sun.misc.Unsafe { *; } -keep class com.google.gson.examples.android.model.** { *; }
2.greenDao混淆
# # ------------------------------------------- # # ######## greenDao混淆 ########## # # ------------------------------------------- -keep class com.manjay.housebox.greendao.** {*;} -keepclassmembers class * extends de.greenrobot.dao.AbstractDao { public static java.lang.String TABLENAME; } -keep class **$Properties
3.volley混淆
# # ------------------------------------------- # # ############### volley混淆 ############### # # ------------------------------------------- -keep class com.android.volley.** {*;} -keep class com.android.volley.toolbox.** {*;} -keep class com.android.volley.Response$* { *; } -keep class com.android.volley.Request$* { *; } -keep class com.android.volley.RequestQueue$* { *; } -keep class com.android.volley.toolbox.HurlStack$* { *; } -keep class com.android.volley.toolbox.ImageLoader$* { *; }
4.sharesdk混淆
## ---------------------------------- ## sharesdk ## ---------------------------------- -keep class cn.sharesdk.**{*;} -keep class com.sina.**{*;} -keep class **.R$* {*;} -keep class **.R{*;} -dontwarn cn.sharesdk.** -dontwarn **.R$*
5.UIL混淆
## ---------------------------------- ## UIL相關 ## ---------------------------------- -keep class com.nostra13.universalp_w_picpathloader.** { *; } -keepclassmembers class com.nostra13.universalp_w_picpathloader.** {*;}
6.高德地圖sdk混淆
## ---------------------------------- ## 高德地圖sdk混淆 ## ---------------------------------- -libraryjars libs/android-support-v4.jar -dontwarn android.support.v4.** -keep class android.support.v4.** { *; } -keep interface android.support.v4.app.** { *; } -keep public class * extends android.support.v4.** -keep public class * extends android.app.Fragment -libraryjars libs/MapApiLocation.jar -libraryjars libs/MapApiSearch.jar -libraryjars libs/Android_Map_V2.0.4.jar -dontwarn com.amap.api.** -dontwarn com.a.a.** -dontwarn com.autonavi.** -keep class com.amap.api.** {*;} -keep class com.autonavi.** {*;} -keep class com.a.a.** {*;}
7.unity混淆(需要修改proguard.jar文件)
## --------------------------------------------------------------- ## unity混淆(需要修改proguard.jar文件) ## --------------------------------------------------------------- -libraryjars f:/work_hb_v021/Lib_SocShare_v237_0804/libs/untiy-classes.jar -dontwarn com.unity3d.player.** -dontwarn org.fmod.** -keep class com.unity3d.player.**{*;} -keep class org.fmod.**{*;} -keep public class * extends com.unity3d.player.** -keep public class * extends org.fmod.**
注:還需要對與unity交互的相關方法或者類(jni)進行混淆配置。
8.內部類或者內部接口類的混淆配置
# # ------------------------------------------- # # ######## 內部類混淆配置 ########## # # ------------------------------------------- -keep class com.manjay.housebox.activity.CityListActivity$*{ <fields>; <methods>; } -keepclassmembers class com.manjay.housebox.activity.CityListActivity$*{*;} -keep class com.manjay.housebox.map.MapActivity$*{ <fields>; <methods>; } -keepclassmembers class com.manjay.housebox.map.MapActivity$*{*;}
參考資料:
1.Android項目:proguard混淆之常見開源項目混淆配置
2.Android項目:proguard混淆之常見問題及解決方法匯總
3.Android項目:自構框架、SDK包或者jar文件庫的混淆及常見問題解決方法
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。