在你的工程目录下新增custom_rules.xml.在执行打包target -package之前,会先执行-release-obfuscation-check,把你的操作脚本写在这个target里就行。脚本如下: