Add the following code to build. Gradle (app)

Android {// omit start............ / / omit the end / / set the app package name Package name - yyyyMMddHHmm - environment _ {version}. Apk android. ApplicationVariants. All {variant - > the variant. The outputs. All {def date = new Date().format("yyyyMMddHHmmss", TimeZone.getTimeZone("GMT+08")) if (variant.buildType.name == 'debug') { outputFileName = "${applicationId}-${date}-debug_${versionName}.apk" } if (variant.buildType.name == 'release') { outputFileName = "${applicationId} - ${date} - ${versionName} release_. Apk"}}} / / omit begin... // omit end}Copy the code