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.universalimageloader.** { *; } -keepclassmembers class com.nostra13.universalimageloader.** {*;}
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混淆(不能使用-libraryjars,jar包已被混淆过,此方法混淆暂未成功)
## --------------------------------------------------------------- ## unity混淆(不能使用-libraryjars,jar包已被混淆过,混淆暂未成功) ## --------------------------------------------------------------- ## -libraryjars 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.**
参考资料:
1.Android项目:proguard混淆之常见开源项目混淆配置
2.Android项目:proguard混淆之常见问题及解决方法汇总
3.Android项目:自构框架、SDK包或者jar文件库的混淆及常见问题解决方法
本文出自 “天空没有痕迹但我飞过” 博客,请务必保留此出处http://glblong.blog.51cto.com/3058613/1435959