Is there any way to change Package Name of Flutter project?
I want to change package name and application name in flutter project.
Is there any way to change Package Name of Flutter project?
I want to change package name and application name in flutter project.
This is how i renamed package for both ios and android
applicationId "com.company.name"
app/src/main
and renamepackage="com.company.name"
andandroid:label="App Name"
app/src/debug
and renamepackage="com.company.name"
app/src/profile
and renamepackage="com.company.name"
app/src/main/kotlin/com/something/something/MainActivity.kt
and renamepackage="com.company.name"
app/src/main/kotlin/
and rename each directory so that the structure looks likeapp/src/main/kotlin/com/company/name/
pubspec.yaml
in your project and changename: something
toname: name
, example :- if package name iscom.abc.xyz
thename: xyz
com.company.name
flutter clean
You can follow this official documentation by Google: https://developer.android.com/studio/build/application-id.html
Application ID should be changed in Build.gradle, while package name can be changed in AndroidManifest.xml.
However one should be careful changing package name.
Also while re uploading the app, one should be careful since it matches the application ID of previously uploaded app with new upload.
I had two manifest.xml file in my app section,so I needed to change package name in both
On Visual Studio code
Edit > Replace in Files
On Android studio
1. Right click on your project > Replace in path
2. Write your old package and new package > Replace all
Android
In Android the package name is in the AndroidManifest:
iOS
In iOS the package name is the bundle identifier in Info.plist:
which is found in Runner.xcodeproj/project.pbxproj:
Changing the name
The package name is found in more than one location, so to change the name you should search the whole project for occurrences of your old project name and change them all.
Android Studio and VS Code:
Thanks to diegoveloper for help with iOS.
Updated You have to change the package name to your desired package name in these five location.
last step is to run
flutter clean