flutter 安卓打包自定义名字

打包的名字如 app.1.0.1_relase_201283893.apk

实现

配置安卓项目的中的build.gradle (android/app/build.gradle )

新增 android { 内

Dart 复制代码
applicationVariants.all { variant ->
        variant.outputs.all {
            def appName = "拓车服管家" // 文件名
            def version = variant.versionName // 版本号
            def buildType = variant.name // 包类型,debug 还是 release
            def createTime = new Date().format('MMddHHmm') // 打包时间 2021_09_25_16_45_52
            if (buildType == "debug") {
                outputFileName = "${appName}_${version}_${buildType}_${createTime}.apk"
            }
            if (buildType == "release") {
                outputFileName = "${appName}_${version}_${buildType}_${createTime}.apk"
            }
        }
    }
相关推荐
冠希陈、1 天前
PHP 判断是否是移动端,更新鸿蒙系统
android·开发语言·php
晚霞的不甘1 天前
Flutter for OpenHarmony从零到一:构建《冰火人》双人合作闯关游戏
android·flutter·游戏·前端框架·全文检索·交互
2601_949833391 天前
flutter_for_openharmony口腔护理app实战+饮食记录实现
android·javascript·flutter
独自破碎E1 天前
【滑动窗口+字符计数数组】LCR_014_字符串的排列
android·java·开发语言
stevenzqzq1 天前
compose 中 align和Arrangement的区别
android·compose
VincentWei951 天前
Compose:MutableState 和 mutableStateOf
android
jian110581 天前
Android studio配置flutter,mac Android studio 发现苹果手机设备
android·flutter·android studio
2501_940007891 天前
Flutter for OpenHarmony三国杀攻略App实战 - 性能优化与最佳实践
android·flutter·性能优化
Rysxt_1 天前
UniApp获取安卓系统权限教程
android·uni-app
毕设源码-朱学姐1 天前
【开题答辩全过程】以 基于安卓的教师上课辅助系统为例,包含答辩的问题和答案
android