android ProGuard 代码混淆实现

时间:2021-04-04 04:40:37

1 修改project.properties,添加ProGuard配置项

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

 

2 自定义混淆文件(举例 android.support.v4组件保留)

   -keep class android.support.v4.** { *; }

   -keep interface android.support.v4.app.** { *; }