How can I change the app display name build with Flutter?
Solution 1
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.
Solution 2
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
Solution 3
There is a plugin called 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 AndroidManifest.xml
and Info.plist
.
Solution 4
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.
Solution 5
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
Related videos on Youtube
![rajaishwary](https://i.stack.imgur.com/D47PP.jpg?s=256&g=1)
rajaishwary
Updated on April 12, 2022Comments
-
rajaishwary about 2 years
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?-
CommonsWare over 6 yearsThe manifest is the only way to change the name that is shown in the Settings app and the name shown on your launcher icon.
-
Infinite Looper about 5 yearsFor visual people this video will show you the whole process youtube.com/watch?v=05twEATiS44
-
Jesus Hernandez Barrios almost 3 yearsUse a plugin,it's easy, fast, secure,and already tested by the comunity, the flutter_app_name package it's a great option, and have support for null-safety. The other recommended package is flutter_launcher_name, but basically flutter_launcher_name don't support null safety, check the Null safety support.
-
-
rajaishwary over 6 yearsYeah, thanks for the answer. I knew the native methods to do that. I was just curious to know if flutter handles it from a single point.
-
Pankaj Bansal about 5 yearsThese are native methods to do that. I want to know flutter handles it from a single point or not?
-
Johnykutty about 5 years@AshtonThomas I can change this but after cleaning rebuilding etc, runner app resets its value, how can I keep this?(As I understand Runner project is recreated after clean build or so)
-
iKK about 5 yearsFor Android, this does not work. Trying to change from <OldName> to <NewName>, the error message sais:
Manifest merger failed : Attribute application@label value=(OldName) from AndroidManifest.xml:21:9-32 is also present at AndroidManifest.xml:21:9-32 value=(NewName).
. What do you suggest ?? -
CopsOnRoad about 5 yearsYou may have more than one
AndroidManifest.xml
file in your project, you will have to open the one located atandroid/app/src/main
. -
ChrisH over 4 yearsThis appears to be all sorts of broken with the latest IOS updates and/or Catalina updates and/or Flutter updates. I have no idea. Changing this now breaks the deployment as it renames the <appname>.app folder from a consistent Runner.app to whatever you put in display name, and then "flutter run" breaks. Now, if you want to change it, you name the name:<value> key in the YAML file, then do global search/replace on the package name. (sigh)
-
Dpedrinha over 4 yearsIf you change Display Name in the runner project it will stop working. It has to be ´Runner' Apparently, it is necessary to change the name and version data on the pubspeck.yaml file only, which is quite incovenient if android and ios apps have different versions or name localization
-
Dpedrinha over 4 yearsNice! I'll test the plugin. But as far as I know, if you change the Display Name on the info.plist file from 'Runner', the app stops compiling. It has to be 'Runner'.
-
Mi Be over 4 yearswhat helped me: go to "Info" Tab and change "Bundle name".
-
Mi Be over 4 yearsSorry it is not working. Like Dpedrinha said, it has to be 'Runner'.
-
Александр Бабич over 4 yearsI wonder how you put display name in pubspec with all spaces, cyrillic letters, etc.
-
Dheeraj Avvari over 4 years@Johnykutty Were you able to figure out? Am also having the same issue
-
CopsOnRoad over 4 years@ChrisH I am running updated version of all, and it does work as expected.
-
Jorge Wander Santana Ureña over 4 yearsit's working for me. But i need to delete the app and reinstall it after run:
flutter pub run flutter_launcher_name:main
-
pjotr_dolphin over 4 yearsFor iOS this is incorrect. One should change the CFBundleName in Info.plist. Flutter will not find the app, as it will look for the Runner.app, and if you change it in Xcode that is no longer the case.
-
Katu over 4 yearsThere is also a plugin to replace the icon pub.dev/packages/flutter_launcher_icons
-
Muhammad bin Yusrat about 4 yearsThis answer is just wrong, at least for iOS. To change the name that is displayed under the Apps icon in iOS, I had to go to App Directory > ios > Runner, open info.plist and change the 'bundle name' from 'app' to whatever I would like to call it. That is the only thing which actually worked. Changing
Runner
inRunner.xcworkspace
will not allow you to run the app after the next build. -
Peter Mortensen over 3 yearsShould the backticks literally be there?
-
Peter Mortensen over 3 yearsShouldn't the tag
application
be closed afterandroid:label="test"
? Or is all of "The rest of the code" (XML) attributes? -
Braken Mohamed over 3 yearsyes it should be closed last after all the tags cuz it's the parent of all tags
-
Ride Sun over 3 yearsThe plugin was not updated for flutter 2.0 and has dependency issues
-
Fethi about 3 yearswhat about name in pubspec.yaml
-
CopsOnRoad about 3 years@Fethi That's just the name of your project. For names, you'll have to edit the
AndroidManifest.xml
file (in Android) andinfo.plist
(in iOS). Flutter docs mention it too. -
Sanal Kv about 3 yearshow to add space between the app name, ios info.plist doesnt support space.
-
Joaquin Hoffmann about 3 yearsI had the followin error that went away when I removed the
flutter_launcher_name
dependency:Flutter – Error: ADB exited with exit code 1
-
Isac Moura about 3 yearsThere is a paliative solution for the problem with the plugin according to this comment
-
Max00355 about 3 yearsThis plugin is no longer valid as it has not been upgraded to Flutter 2, so you will run into dependency issues.
flutter_app_name
(pub.dev/packages/flutter_app_name) is a nearly identical plugin but works with Flutter 2.0. -
Haidar almost 3 years@CopsOnRoad is it a better practice to define the android app name inside strings.xml instead of hardcoding it?
-
CopsOnRoad almost 3 years@HaidarMehsen Yes, you should if you're targeting different locales.
-
Tarik Hacialiogullari over 2 yearsI found a plugin to change display name of both at one location: pub.dev/packages/flutter_launcher_name
-
bolino about 2 yearsA more recent version of this module, compatible with Flutter 2 and with null safety, is pub.dev/packages/flutter_app_name
-
qix about 2 yearsEven newer than the published package is the repo itself: github.com/f-prime/flutter_app_name which includes changes to support setting the bundleId (iOS) / applicationId (android) thanks to PR1