增加以下代码applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.equals('app-debug.apk')) {
def fileName = outputFile.name.replace("app-debug.apk", "name.apk")
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
android配置打包名称
最新推荐文章于 2024-06-01 15:41:52 发布
本文介绍如何使用Gradle构建脚本修改Android应用的APK文件名称,通过代码示例展示了在构建过程中替换默认的app-debug.apk为自定义名称的方法。

1854

被折叠的 条评论
为什么被折叠?



