build.gradle下添加
applicationVariants.all { variant ->
variant.outputs.all { output ->
def fileName = "自定義名稱_${variant.versionName}_release.apk"
def outFile = output.outputFile
if (outFile != null && outFile.name.endsWith('.apk')) {
outputFileName = fileName
}
}
}