Meituan-Dianping/walle

MAC打包后运行闪退。

BananaHuo opened this issue · 1 comments

打包脚本如下
#!/bin/sh

author:zhengqk

此脚本用于多渠道打包app,可输入 flavor 列表打包相应的 flavor 包

使用:

sh pack.sh : 打channel_yidianling渠道文件下flavor为yidianling的包

sh pack.sh huawei : 打channel_huawei 渠道文件下flavor为huawei的包

if [[ $# -gt 0 ]]; then
args=""
flavors=("yidianling" "huawei")
./gradlew clean
while [[ $# -gt 0 ]]; do
if [[ " ${flavors[*]} " == " $1 " ]]; then
arg="$(tr '[:lower:]' '[:upper:]' <<< ${1:0:1})${1:1}"
./gradlew assemble${arg}ReleaseChannels -PchannelFile=./channel_${1} &&
mv app/build/outputs/robust/methodsMap.robust app/robust/methodsMap.robust.${1}
else
echo "Flavor :$1 不存在"
exit 1
fi
shift
done
else
./gradlew clean &&
./gradlew assembleReleaseChannels -PchannelFile=./channel_yidianling &&
mv app/build/outputs/robust/methodsMap.robust app/robust/methodsMap.robust.yidianling
fi
exit 0

Windows 用这个脚本打包是可以的。mac上面是因为这个混淆问题,如果把realease的混淆关闭就没问题,这个应该怎么解决下啊?