目录

混淆打包注意

优质
小牛编辑
124浏览
2023-12-01

混淆打包

在项目的主工程目录的proguard-project.txt配置中加入如下设置:

V3.2.3及后续版本:

-dontwarn solid.ren.skinlibrary.**
-keep class solid.ren.skinlibrary.** { *; }
-keep interface solid.ren.skinlibrary.** { *; }
-keep public class * extends solid.ren.skinlibrary.**
-dontwarn cn.ntalker.**
-keep class cn.ntalker.** { *; }
-dontwarn com.ntalker.**
-keep class cn.xnglide.** { *; }
-dontwarn cn.xnglide.**
-keep class com.ntalker.** { *; }
-dontwarn okhttp3.**
-keep class okhttp3.**{*;}
-dontwarn okio.**
-keep class okio.**{*;}
-dontwarn com.bumptech.**
-keep class com.bumptech.**{*;}
#友盟推送
-dontwarn com.umeng.**
-dontwarn com.taobao.**
-dontwarn anet.channel.**
-dontwarn anetwork.channel.**
-dontwarn org.android.**
-dontwarn org.apache.thrift.**
-dontwarn com.xiaomi.**
-dontwarn com.huawei.**
-dontwarn com.meizu.**
-keep class com.umeng.** { *; }
-keep class com.taobao.** { *; }
-keep class anet.channel.** { *; }
-keep class anetwork.channel.** { *; }
-keep class org.android.**{ *; }
-keep class org.apache.thrift.** { *; }
-keep class com.xiaomi.** { *; }
-keep class com.huawei.** { *; }
-keep class com.meizu.** { *; }

V3.1.8版本:

-dontwarn solid.ren.skinlibrary.**
-keep class solid.ren.skinlibrary.** { *; }
-keep interface solid.ren.skinlibrary.** { *; }
-keep public class * extends solid.ren.skinlibrary.**
-dontwarn cn.ntalker.**
-keep class cn.ntalker.** { *; }
-dontwarn com.ntalker.**
-keep class com.ntalker.** { *; }
-dontwarn okhttp3.**
-keep class okhttp3.**{*;}
-dontwarn okio.**
-keep class okio.**{*;}
-dontwarn com.bumptech.**
-keep class com.bumptech.**{*;}

V3.1.2及以前版本:

-dontwarn solid.ren.skinlibrary.**
-keep class solid.ren.skinlibrary.** { *; }
-keep interface solid.ren.skinlibrary.** { *; }
-keep public class * extends solid.ren.skinlibrary.**
-dontwarn cn.bumptech.xnglide.**
-keep class cn.bumptech.xnglide.** { *; }
-dontwarn cn.xiaoneng.**
-keep class cn.xiaoneng.** { *; }
-keep interface cn.bumptech.xnglide.** { *; }
-keep public class * extends cn.bumptech.xnglide.**

V3.1.3版本:

-dontwarn solid.ren.skinlibrary.**
-keep class solid.ren.skinlibrary.** { *; }
-keep interface solid.ren.skinlibrary.** { *; }
-keep public class * extends solid.ren.skinlibrary.**
-dontwarn cn.bumptech.xnglide.**
-dontwarn cn.ntalker.**
-keep class cn.bumptech.xnglide.** { *; }
-keep class cn.ntalker.** { *; }
-keep interface cn.bumptech.xnglide.** { *; }
-keep public class * extends cn.bumptech.xnglide.**
-dontwarn okhttp3.**
-keep class okhttp3.**{*;}
-dontwarn okio.**
-keep class okio.**{*;}