close

How to change package name in flutter?

Hello Guys. Many times we need to change the package name of our project in flutter. So in this tutorial, we are going to learn How to change package name in flutter?

It is totally different method to change package names in android and iOS as well. So here is two methods for android and iOS. Here is defined all steps please followed meticulously to prevent any potential crash.

How to Change Package name in flutter for Android Project

Time needed: 2 minutes.

  1. How to Change Package name in flutter for Android Project

    There are 4 steps to change the Package Name of your Flutter app in android. so follow every one step carefully.

  2. Change the package name in your main AndroidManifest.xml file

    Modify the file as the following path:
    <Proect-Path>/android/app/src/main/AndroidManifest.xml

    Replace “com.example.flutter_app_test” with your new package name

  3. Change the package name in your debug AndroidManifest.xml file

    Do Same Here as We did in step 2.
    <Proect-Path>/android/app/src/debug/AndroidManifest.xml

    Replace “com.example.flutter_app_test” with your new package name

  4. Change the package name in your profile AndroidManifest.xml file

    Do Same Here as We did in step 3 but with different paths.
    <Proect-Path>/android/app/src/profile/AndroidManifest.xml

    Replace “com.example.flutter_app_test” with your new package name

  5. Change the applicationId in your build.gradle file

    Then all we need to do is change applicationId in build.gradle file.
    <Proect-Path>/android/app/src/build.gradle

    Replace “com.example.flutter_app_test” with your new package name in applicationId as shown in the above image.

  6. Run Flutter Clean

    And this is our final step to reflect all changes. It’s recommended to run flutter clean after making changes.

How to Change Package name in flutter for Android Project

To change package name in a flutter. just change the package name in all the following files.
1. <Proect-Path>/android/app/src/main/AndroidManifest.xml
2. <Proect-Path>/android/app/src/debug/AndroidManifest.xml
3. <Proect-Path>/android/app/src/profile/AndroidManifest.xml
4. <Proect-Path>/android/app/src/build.gradle

So Guys That’s It For change package name in flutter tutorial. Hope you like our tutorial. Comment below Your thoughts and your queries. And Also Comment on your suggestion here.

Also Read

Leave a Comment

%d bloggers like this: