[英]How to change the name of package apk installer in flutter?
I change my app name from AndroidManifest.xml but I want change name of package installer.我从 AndroidManifest.xml 更改了我的应用程序名称,但我想更改 package 安装程序的名称。
How can I change "app-release" to anything I want?如何将“app-release”更改为我想要的任何内容?
How to change app-release?如何更改应用程序版本?
I change my app name from AndroidManifest.xml, but I can't change name of package installer我从 AndroidManifest.xml 更改了我的应用程序名称,但我无法更改 package 安装程序的名称
This is mainly a question about Android build, not flutter. To change the output file name you can add this code into android/app/bundle.gradle
这主要是关于 Android 构建的问题,而不是 flutter。要更改 output 文件名,您可以将此代码添加到
android/app/bundle.gradle
android {
// ...
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "yourname.apk"
}
}
}
Even when you run the command flutter build apk
you will see the wrong name in the output (I guess that's a flutter issue), but no worries, your file name will be correct:即使您运行命令
flutter build apk
,您也会在 output 中看到错误的名称(我猜这是 flutter 的问题),但不用担心,您的文件名将是正确的:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.