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.
Change
name
attribute inpubspec.yaml
(line 1)For the name of apk, change
android:label
inAndroidManifest.xml
change in all AndroidManifest.xml files of your Flutter Project, --> package="your.name.app" (app/src/debug/AndroidManifest.xml) and (app/src/main/AndroidManifest.xml) and (app/src/profile/AndroidManifest.xml)
good look !!
For Android App Name
Change the label name in your
AndroidManifest.xml
file:For Package Name
Change the package name in your
AndroidManifest.xml
file:Also in your
build.gradle
file inside app folderFinally, change the package in your
MainActivity.java
classChange the directory name:
From:
To:
EDITED : 27-Dec-18
for package name just change in build
build.gradle
onlyFor iOS
Change the bundle identifier from your
Info.plist
file inside yourios/Runner
directory.UPDATE
To avoid renaming the package and bundle identifier, you can start your project using this command in your terminal:
Changing name manually doesn't seem to work, throws gradle errors, well in my case it does throw error.
So I usually create a new flutter project.
I use below mentioned command to create a new flutter app
your project will have the package name as ->
com.yourdomain.appname
if you just want to keep your package name as
com.appname
then make some changes as below