如何更改使用 Flutter 构建的应用程序显示名称? [英] How can I change the app display name build with Flutter?

查看:32
本文介绍了如何更改使用 Flutter 构建的应用程序显示名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 Flutter create testapp 创建了该应用程序.现在,我想将应用程序名称从testapp"更改为到我的旅行追踪器".我该怎么做?

我已尝试从 AndroidManifest.xml 进行更改,但它已更改,但 Flutter 是否提供了一种方法来做到这一点?

解决方案

更新:从评论来看,这个答案似乎已经过时

Flutter 文档指出您可以在何处更改 Android 和 iOS 应用程序的显示名称.这可能就是您要找的:

安卓版

您似乎已经在 AndroidManifest.xml 中作为 application 条目找到了它.

<块引用>

查看位于以下位置的默认 App Manifest 文件 AndroidManifest.xml/android/app/src/main/ 并验证值是否正确,特别是:

application:编辑 application 标签中的 android:label 以反映应用程序的最终名称应用程序.

iOS

查看查看Xcode项目设置部分:

<块引用>

在 Xcode 中导航到目标设置:

在 Xcode 中,打开应用的 ios 文件夹中的 Runner.xcworkspace.

<块引用>

要查看应用的设置,请在 Xcode 项目中选择 Runner 项目航海家.然后,在主视图侧栏中,选择 Runner 目标.

<块引用>

选择常规标签.接下来,您将验证最重要的设置:

显示名称:要在主屏幕上显示的应用名称和其他地方.

I have created the app using Flutter create testapp. Now, I want to change the app name from "testapp" to "My Trips Tracker". How can I do that?

I have tried changing from the AndroidManifest.xml, and it got changed, but is there a way that Flutter provides to do that?

解决方案

UPDATE: From the comments this answer seems to be out of date

The Flutter documentation points out where you can change the display name of your application for both Android and iOS. This may be what you are looking for:

For Android

It seems you have already found this in the AndroidManifest.xml as the application entry.

Review the default App Manifest file AndroidManifest.xml located in /android/app/src/main/ and verify the values are correct, especially:

application: Edit the android:label in the application tag to reflect the final name of the app.

For iOS

See the Review Xcode project settings section:

Navigate to your target’s settings in Xcode:

In Xcode, open Runner.xcworkspace in your app’s ios folder.

To view your app’s settings, select the Runner project in the Xcode project navigator. Then, in the main view sidebar, select the Runner target.

Select the General tab. Next, you’ll verify the most important settings:

Display Name: the name of the app to be displayed on the home screen and elsewhere.

这篇关于如何更改使用 Flutter 构建的应用程序显示名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆