1 修改project.properties,添加ProGuard配置項android
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txtapp
2 自定義混淆文件(舉例 android.support.v4組件保留)class
-keep class android.support.v4.** { *; }配置
-keep interface android.support.v4.app.** { *; }sdk