Skip links

How to change the package name ?

How to change the package name ?

This is very important. Your app cannot have the same package name as other app. If it   does, the  playstore will not accept it as an unique application. So rename your app according to your business/brand name.Try to write  an unique package name.

Naming convention : https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html

For example

Let’s say your package is : com.onatcipli.networkUpp

And your app name is “Network Upp”

Then ,

Run this command inside your flutter project root.
Run the command in android studio terminal :

futter pub run rename –bundleId com.onatcipli.networkUpp

futter  pub run rename –appname “Network Upp” 

 

Try uninstalling the app from the emulator , then run the commands and then restart the app.

If it does not work, first uninstall, then restart the app then run the commands.

**In case the above do not work:

In Android

for package name just change in build build.gradle only (anddroid/app/build.gradle)

defaultConfig {

    applicationId “bundleId com.onatcipli.networkUpp

   ………….

}

 

For iOS

Change the bundle identifier from your Info.plist file inside your ios/Runner directory.

<key>CFBundleIdentifier</key>

<string>bundleId com.onatcipli.networkUpp</string>

 

If you face issues consult a flutter developer.