在app的build.gradle添加代码:
android { ...... android.applicationVariants.all { variant -> variant.outputs.all { if (variant.buildType.name == 'release') { outputFileName = "App-${versionName}-${new Date().format("yyyyMMddHHmm", TimeZone.getTimeZone("GMT+8"))}-release.apk" } else { outputFileName = "App-${versionName}-${new Date().format("yyyyMMddHHmm", TimeZone.getTimeZone("GMT+8"))}-debug.apk" } } } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)