在app的build.gradle的android{}添加一下代码
android.applicationVariants.all{ variant -> variant.outputs.all{ def createTime = new Date().format("YYYYMMdd", TimeZone.getTimeZone("GMT+08:00")) //在这里修改apk文件名 def appName = "apk名称" def appVersion = "apk版本号" def fileName = "${appName}_${buildType.name}_v${appVersion}_${createTime}.apk" outputFileName = fileName } }
标签:appName,apk,appVersion,APK,studio,Android,android,def From: https://www.cnblogs.com/tlazy-12138/p/17704299.html