[android] How can I change the app display name build with Flutter?

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?

This question is related to android ios flutter dart build

The answer is


Android

Open AndroidManifest.xml (located at android/app/src/main)

<application
    android:label="App Name" ...> // Your app name here

iOS

Open info.plist (located at ios/Runner)

<key>CFBundleName</key>
<string>App Name</string> // Your app name here

Don't forget to run

flutter clean

You can change it in iOS without opening Xcode by editing the project/ios/Runner/info.plist <key>CFBundleDisplayName</key> to the String that you want as your name.

FWIW - I was getting frustrated with making changes in Xcode and Flutter, so I started committing all changes before opening Xcode, so I could see where the changes show up in the Flutter project.


There is a plugin, flutter_launcher_name.

Write file pubspec.yaml:

dev_dependencies:
  flutter_launcher_name: "^0.0.1"

flutter_launcher_name:
  name: "yourNewAppLauncherName"

And run:

flutter pub get
flutter pub run flutter_launcher_name:main

You can get the same result as editing AndroidManifes.xml and Info.plist.


  • Review the default app manifest file, AndroidManifest.xml, located in <app dir>/android/app/src/main

  • Edit the android:label to your desired display name


You can change it in iOS without opening Xcode by editing file *project/ios/Runner/info.plist. Set <key>CFBundleDisplayName</key> to the string that you want as your name.

For Android, change the app name from the Android folder, in the AndroidManifest.xml file, android/app/src/main. Let the android label refer to the name you prefer, for example,

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    <application
        android:label="test"
        // The rest of the code
    </application>
</manifest>

There are several possibilities:

1- The use of a package:

I suggest you to use flutter_launcher_name because of the command-line tool which simplifies the task of updating your Flutter app's launcher name.

Usage:

Add your Flutter Launcher name configuration to your pubspec.yaml file:

dev_dependencies:
  flutter_launcher_name: "^0.0.1"

flutter_launcher_name:
  name: "yourNewAppLauncherName"

After setting up the configuration, all that is left to do is run the package.

flutter pub get
flutter pub run flutter_launcher_name:main

If you use this package, you don't need modify file AndroidManifest.xml or Info.plist.

2- Edit AndroidManifest.xml for Android and info.plist for iOS

For Android, edit only android:label value in the application tag in file AndroidManifest.xml located in the folder: android/app/src/main

Code:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="Your Application Name"  //here
        android:icon="@mipmap/ic_launcher">
        <activity>
        <!--  -->
        </activity>
    </application>
</manifest>

Screenshot:

Enter image description here

For iOS, edit only the value inside the String tag in file Info.plist located in the folder ios/Runner .

Code:

<plist version="1.0">
<dict>
    <key>CFBundleName</key>
    <string>Your Application Name </string>  //here
</dict>
</plist>

Screenshot:

Enter image description here

Do a flutter clean and restart your application if you have a problem.


One problem is that in iOS Settings (iOS 12.x) if you change the Display Name, it leaves the app name and icon in iOS Settings as the old version.


For Android, change the app name from the Android folder. In the AndroidManifest.xml file, in folder android/app/src/main, let the android label refer to the name you prefer, for example,

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    <application
        `android:label="myappname"`
        // The rest of the code
    </application>
</manifest>

As of 2019-12-21, you need to change the name [NameOfYourApp] in file pubspec.yaml. Then go to menu Edit ? Find ? Replace in Path, and replace all occurrences of your previous name.

Also, just for good measure, change the folder names in your android directory, e.g. android/app/src/main/java/com/example/yourappname.

Then in the console, in your app's root directory, run

flutter clean

By default, when a flutter app gets installed, the app name on the launcher is your Flutter project name. To change that to your desired application name on Android or iOS both, you need to change AndroidManifest.xml and Info.plist respectively. here is a two way to achieve this

1 By plugin

You can use a flutter rename plugin. It helps you to change your flutter project's AppName and BundleId for different platforms, currently only available for iOS, Android and macOS

You can change the bundleId and appName in the following steps

Default Usage if you dont pass -t or --target parameter it will try to rename all available platform project folders inside flutter project.

Run this command inside your flutter project root.

pub global run rename --bundleId com.onatcipli.networkUpp
pub global run rename --appname "Test App Name"

Custom Usage if you want to run commands directly (without using pub global run) ensure you add system catche bin directory to your path

rename --appname yourappname -t ios

or

pub global run rename --appname yourappname --target macOS

To target a specific platform use the "--target" option. e.g.

pub global run rename --bundleId com.example.android.app --target android

2 By manual

For Android

App Name is reflected under Android>src>main>Androidmanifest.xml The label name in the Android manifest is responsible for giving the App Name for Android Application

Go to AndroidManifest.xml, find <application> tag. Change its android:label property with your desired app name.

Navigate to the : android/app/src/main/AndroidManifest.xml

enter image description here

The Androidmanifest.xml can now be modified. Choose the

<application
  android:name="io.flutter.app.FlutterApplication"
  android:label="YourAppName"
  android:icon="@mipmap/ic_launcher">

For Package Name

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="your.package.name">

This portion represents the actual Android file naming system. Important information like Launcher Icon and App name can be controlled here. Modify the android:label to change the App Name only.

For iOS

For iOS, open info.plist. Change CFBundleName (Bundle Name).

Go to the Xcode project folder and open Info.plist for edit (in Xcode you can choose Open As > Source Code in the file context menu). All we need is to edit the value for key CFBundleName. It’s a user-visible short name for the bundle.

Navigate to the: project/ios/Runner/Info.plist

enter image description here

Find the CFBundleName <key>. This denotes the Key that holds the app name. The app name now can be changed by modifying the <String> </String> below that.

<key>CFBundleName</key>
<string>YouAppName</string>

That’s it. By having these changes, That’s achieved, an updated application name in the launcher when an app gets installed on a device. your new app name will be displayed on your phone now.


First Rename your AndroidManifest.xml file

android:label="Your App Name"

Second Rename Your Application Name in Pubspec.yaml file name: Your Application Name

Third Change Your Application logo

flutter_icons:
   android: "launcher_icon"
   ios: true
   image_path: "assets/path/your Application logo.formate"

Fourth Run

flutter pub pub run flutter_launcher_icons:main

The way of changing the name for iOS and Android is clearly mentioned in the documentation as follows:

But, the case of iOS after you change the Display Name from Xcode, you are not able to run the application in the Flutter way, like flutter run.

Because the Flutter run expects the app name as Runner. Even if you change the name in Xcode, it doesn't work.

So, I fixed this as follows:

Move to the location on your Flutter project, ios/Runner.xcodeproj/project.pbxproj, and find and replace all instances of your new name with Runner.

Then everything should work in the flutter run way.

But don't forget to change the name display name on your next release time. Otherwise, the App Store rejects your name.


Questions with android tag:

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks Why am I seeing net::ERR_CLEARTEXT_NOT_PERMITTED errors after upgrading to Cordova Android 8? "Failed to install the following Android SDK packages as some licences have not been accepted" error Android Gradle 5.0 Update:Cause: org.jetbrains.plugins.gradle.tooling.util No Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator WebView showing ERR_CLEARTEXT_NOT_PERMITTED although site is HTTPS WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()' GoogleMaps API KEY for testing Can I use library that used android support with Androidx projects. How to allow all Network connection types HTTP and HTTPS in Android (9) Pie? Android Material and appcompat Manifest merger failed Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0 How to format DateTime in Flutter , How to get current time in flutter? How to change package name in flutter? Failed to resolve: com.android.support:appcompat-v7:28.0 What is AndroidX? Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve FirebaseInstanceIdService is deprecated installation app blocked by play protect Handling back button in Android Navigation Component Android design support library for API 28 (P) not working Failed to resolve: com.google.firebase:firebase-core:16.0.1 com.google.android.gms:play-services-measurement-base is being requested by various other libraries java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion Install Android App Bundle on device Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. How to develop Android app completely using python? Invoke-customs are only supported starting with android 0 --min-api 26 Flutter.io Android License Status Unknown How to open Android Device Monitor in latest Android Studio 3.1 Default interface methods are only supported starting with Android N How can I change the app display name build with Flutter? Error:(9, 5) error: resource android:attr/dialogCornerRadius not found error: resource android:attr/fontVariationSettings not found Flutter does not find android sdk Error - Android resource linking failed (AAPT2 27.0.3 Daemon #0) Error : Program type already present: android.support.design.widget.CoordinatorLayout$Behavior flutter run: No connected devices Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 Still getting warning : Configuration 'compile' is obsolete and has been replaced with 'implementation' PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (in windows 10)

Questions with ios tag:

Adding a UISegmentedControl to UITableView Crop image to specified size and picture location Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Keep placeholder text in UITextField on input in IOS Accessing AppDelegate from framework? Autoresize View When SubViews are Added Warp \ bend effect on a UIView? Speech input for visually impaired users without the need to tap the screen make UITableViewCell selectable only while editing Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 iPhone is not available. Please reconnect the device Is it possible to opt-out of dark mode on iOS 13? Make a VStack fill the width of the screen in SwiftUI Presenting modal in iOS 13 fullscreen The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code Xcode 10: A valid provisioning profile for this executable was not found Xcode 10, Command CodeSign failed with a nonzero exit code Command CompileSwift failed with a nonzero exit code in Xcode 10 How to format DateTime in Flutter , How to get current time in flutter? Xcode couldn't find any provisioning profiles matching How can I change the app display name build with Flutter? Convert Json string to Json object in Swift 4 Distribution certificate / private key not installed Get safe area inset top and bottom heights Error ITMS-90717: "Invalid App Store Icon" iOS Swift - Get the Current Local Time and Date Timestamp Xcode 9 Swift Language Version (SWIFT_VERSION) How do I use Safe Area Layout programmatically? Fixing Xcode 9 issue: "iPhone is busy: Preparing debugger support for iPhone" Cordova app not displaying correctly on iPhone X (Simulator) Detect if the device is iPhone X Xcode 9 error: "iPhone has denied the launch request" No signing certificate "iOS Distribution" found iOS 11, 12, and 13 installed certificates not trusted automatically (self signed) com.apple.WebKit.WebContent drops 113 error: Could not find specified service Safe Area of Xcode 9 How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc? What are my options for storing data when using React Native? (iOS and Android) Xcode Error: "The app ID cannot be registered to your development team." Open Url in default web browser Linker Command failed with exit code 1 (use -v to see invocation), Xcode 8, Swift 3 HTML5 Video autoplay on iPhone Swift error : signal SIGABRT how to solve it What is the meaning of 'No bundle URL present' in react-native? Convert NSDate to String in iOS Swift How can I regenerate ios folder in React Native project? `React/RCTBridgeModule.h` file not found Removing object from array in Swift 3 I get conflicting provisioning settings error when I try to archive to submit an iOS app

Questions with flutter tag:

Flutter Countdown Timer How to make an AlertDialog in Flutter? FlutterError: Unable to load asset Set the space between Elements in Row Flutter Flutter: RenderBox was not laid out Space between Column's children in Flutter How to change status bar color in Flutter? How can I add shadow to the widget in flutter? Flutter - The method was called on null Flutter- wrapping text Flutter plugin not installed error;. When running flutter doctor How to scroll page in flutter Waiting for another flutter command to release the startup lock Under which circumstances textAlign property works in Flutter? How to format DateTime in Flutter , How to get current time in flutter? Flutter : Vertically center column How to change package name in flutter? Rounded Corners Image in Flutter How do you change the value inside of a textfield flutter? Flutter: Setting the height of the AppBar How to add image in Flutter Flutter position stack widget in center Custom Card Shape Flutter SDK Flutter command not found Dart/Flutter : Converting timestamp How do I center text vertically and horizontally in Flutter? Flutter Circle Design Iterating through a list to render multiple widgets in Flutter? How to change TextField's height and width? How to set the width of a RaisedButton in Flutter? HTTP POST with Json on Body - Flutter/Dart How to find the path of Flutter SDK Not able to change TextField Border Color Create a button with rounded border How do I use hexadecimal color strings in Flutter? Button Width Match Parent flutter corner radius with transparent background Create a rounded button / button with border-radius in Flutter Dart: mapping a list (list.map) How to create a circle icon button in Flutter? Flutter.io Android License Status Unknown How to use conditional statement within child attribute of a Flutter Widget (Center Widget) How to make flutter app responsive according to different screen size? Check whether there is an Internet connection available on Flutter app How to create number input field in Flutter? How to Determine the Screen Height and Width in Flutter How to run code after some delay in Flutter? Flutter: Run method on Widget build complete Round button with text and icon in flutter How can I change the app display name build with Flutter?

Questions with dart tag:

How to integrate Dart into a Rails app Flutter Countdown Timer How to make an AlertDialog in Flutter? Set the space between Elements in Row Flutter Flutter: RenderBox was not laid out Space between Column's children in Flutter How to change status bar color in Flutter? How can I add shadow to the widget in flutter? Flutter - The method was called on null Flutter- wrapping text Flutter plugin not installed error;. When running flutter doctor How to scroll page in flutter How to format DateTime in Flutter , How to get current time in flutter? How to change package name in flutter? How do you change the value inside of a textfield flutter? Flutter: Setting the height of the AppBar How to add image in Flutter Flutter position stack widget in center Flutter command not found Dart/Flutter : Converting timestamp Flutter Circle Design Iterating through a list to render multiple widgets in Flutter? HTTP POST with Json on Body - Flutter/Dart Not able to change TextField Border Color How do I use hexadecimal color strings in Flutter? flutter corner radius with transparent background Create a rounded button / button with border-radius in Flutter Dart: mapping a list (list.map) How to use conditional statement within child attribute of a Flutter Widget (Center Widget) How to make flutter app responsive according to different screen size? Check whether there is an Internet connection available on Flutter app How to create number input field in Flutter? How to Determine the Screen Height and Width in Flutter Flutter: Run method on Widget build complete How can I change the app display name build with Flutter? How do I disable a Button in Flutter? How to set up devices for VS Code for a Flutter emulator How to clear Flutter's Build cache? How to implement drop down list in flutter? Flutter: how to make a TextField with HintText but no Underline? Dart SDK is not configured How to add a border to a widget in Flutter? How to work with progress indicator in flutter? How to create Toast in Flutter? How to add a ListView to a Column in Flutter? How can I dismiss the on screen keyboard? Visual Studio Code - Target of URI doesn't exist 'package:flutter/material.dart' Flutter - Wrap text on overflow, like insert ellipsis or fade Show/hide widgets in Flutter programmatically Flutter - Layout a Grid

Questions with build tag:

error: This is probably not a problem with npm. There is likely additional logging output above Module not found: Error: Can't resolve 'core-js/es6' WARNING in budgets, maximum exceeded for initial How can I change the app display name build with Flutter? Error - Android resource linking failed (AAPT2 27.0.3 Daemon #0) Still getting warning : Configuration 'compile' is obsolete and has been replaced with 'implementation' Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci Error:Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more details Component is part of the declaration of 2 modules Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven docker build with --build-arg with multiple arguments Maven:Non-resolvable parent POM and 'parent.relativePath' points at wrong local POM Android Error Building Signed APK: keystore.jks not found for signing config 'externalOverride' ERROR: Sonar server 'http://localhost:9000' can not be reached Visual Studio 2013 error MS8020 Build tools v140 cannot be found How can I run multiple npm scripts in parallel? Execution failed for task 'app:mergeDebugResources' Crunching Cruncher....png failed AndroidStudio: Failed to sync Install build tools Run a command shell in jenkins Android Studio gradle takes too long to build Install / upgrade gradle on Mac OS X Xcode process launch failed: Security Android Studio build fails with "Task '' not found in root project 'MyProject'." How to pass parameters to maven build using pom.xml? How/When does Execute Shell mark a build as failure in Jenkins? Docker and securing passwords NuGet auto package restore does not work with MSBuild External VS2013 build error "error MSB4019: The imported project <path> was not found" How to execute Ant build in command line CMake output/build directory The POM for project is missing, no dependency information available Visual Studio "Could not copy" .... during build How to build & install GLFW 3 and use it in a Linux project Build unsigned APK file with Android Studio Go build: "Cannot find package" (even though GOPATH is set) error MSB6006: "cmd.exe" exited with code 1 Non-resolvable parent POM for Could not find artifact and 'parent.relativePath' points at wrong local POM iOS - Build fails with CocoaPods cannot find header files Await operator can only be used within an Async method How do I add a new sourceset to Gradle? Gradle does not find tools.jar How to compile Go program consisting of multiple files? Node package ( Grunt ) installed but not available What is pluginManagement in Maven's pom.xml? Debugging doesn't start Linux configure/make, --prefix? How to mark a build unstable in Jenkins when running shell scripts How schedule build in Jenkins? Re-sign IPA (iPhone) Unable to locate tools.jar