Hello guys, Most of you already have created an Android application, or else you have recently started creating one Android application, so at that time you will have heard the word “package name“. Now you want to change your default package name with whatever you want. For example, ‘com.example.app‘ to ‘com.smgplaza.app’.
For those, who already created android application and they want to publish their own app on Play Store but when you publish an app then suddenly you get an error like ‘please change your package name‘ so at that time don’t be panic, because I will give you the best method to change app your package name in Android Studio. so let’s begin…….
What is package name :-
First of all, let’s see what is package name in android studio. So package name is basically a unique identity of any android application, it is also unique identification in Google Play Store. Remember after publishing your app on play store, you can’t change your package name.
Steps to change package name :-
1 . First of all you need to open your project which one you want to change your package name and then after In your Project pane, click on the little gear icon ( ) . Now Uncheck / De-select the
Compact Empty Middle Packages option
2. Your package directory will now be broken up in individual directories as below image.
3. Now select any part which one you want to change and right click on that part and click on Refactor option, now in Refactor option you can see Rename option. Simply click on that Rename option to change that part.
4. After you click on Rename option you will see one Pop-up dialog, click on
Rename Package instead of Rename Directory.
5.Now Enter the new name and hit Refactor like below image.
6. After Clicking on Refactor button you will see Do Refactor in the bottom.
7. Now you can see your package name is will be changed.
8. Now one last step is left to do is open your Gradle Build File (
build.gradle – Module app). Update the
applicationId in the
defaultConfig to your new Package Name and Sync Gradle, if it hasn’t already been updated automatically.
Done! Anyways, If you like this article and you want more articles related to application development then keep visiting Smgplaza.
Also Read :- How to get started with Python?
Other Articles :-
- How to install Android Studio on Windows.
- How to learn Python programming.
- TOP 5 PC GAME FOR 4GB RAM (2019)