Loading ...

Change the package name of your android application in android studio | CodeAsp.Net

Change the package name of your android application in android studio

 /5
0 (0votes)

You may need to change the package name for your android application due to various reasons ranging from a small typo to duplicate domain name. Changing the package name saves you the trouble of creating a new project and then copying all the files. 

Steps to change the package name of your android project are:

1. Go to the "AndroidManiFest.xml" file.

2. Under the manifest tag you will see the attribute package. This is where your android package name has been written.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.package_name_to_be_changed.codeasp.packagenamechangeproject" >

The package name here is package_name_to_be_changed.

3. To change the package name, double click on the current package name or select the package name and click the right mouse button(Windows users). Mac user's press the track pad with two fingers.

The option menu pop ups. Hover on Refactor.

4. Click Rename.

Note: Shortcut for reaching the same menu: shift + F6+ fn 

5. A new dialog box will open up on the top; here click on Rename package.

6. On clicking the Rename Package, another dialog box will pop up with a field having editable text in it. Change or rename the package name as you desire.

Rename it to:

Now click Refactor.

7. After clicking the Refactor button, a the Find window pops up.Here, the android studio shows you all the occurrences or usages of the package name you set previously. You can either cancel it by clicking the Cancel button, or carry on with the change by clicking Do Refactor.

8. Click on Do Refactor. You will see all the occurrences of the previous package name has been changed.

9. Now click on the "app" from your project view.

Press the right click button (Windows users). Mac user's press the track pad with two fingers. (This has to be done on the app folder only).

10. The context menu will open. Select the Open module settings

11. With the app folder selected, click on Flavours. Notice that under Application id the package name is still the same.

Note: Shortcut to reach the same menu: command + ↓

12. Rename that to the changed package name. And click OK.

.

13. After that you will see a message: Gradle sync in progress.  


Your project's package name has been successfully changed.

Comments (16)

   
bankruptcy software

I want you to thank for your time of this wonderful read!!! I definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog!!!!

9/26/2016
 · 
by
   
San Diego Moving Company

This is also a very good post which I really enjoy reading. It is not everyday that I have the possibility to see something like this.

9/28/2016
 · 
by
   
bankruptcy software

We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work.

9/28/2016
 · 
by
   
travertine tile supplier delhi

Thank you, I've been seeking for info about this subject matter for ages and yours is the best I have discovered so far.

9/29/2016
 · 
by
   
luxury holidays packages

Good post. I learn some thing tougher on distinct blogs everyday. Most commonly it really is stimulating to learn to read content material from other writers and exercise a specific thing there.

9/29/2016
 · 
by
   
Packers And Movers Bangalore

We Provide Best Packers And Movers Bangalore List for Get Free Best Quotes, Compare Charges, Save Money And Time,
Household Shifting Services @ http://packersmoversbangalore.in/
http://packersmoversbangalore.in/packers-and-movers-bangalore-to-hyderabad

2/22/2017
 · 
by
   
packers and movers bangalore

Packers and Movers Bangalore list, Cheap Packers Movers Bangalore Charges, Local, Affordable Household Shifting Bangalore,
@ http://Packers-and-Movers-Bangalore.in/

2/24/2017
 · 
by
   
prena sharma

We Provide Best Packers And Movers Gurgaon List for Get Free Best Quotes, Compare Charges,
Save Money And Time, Household Shifting Services @ http://packers-and-movers-gurgaon.in/

3/14/2017
 · 
by
   
Ritu Somani

i really like your blog, thanks for share...
please visit are website..
http://packersmovershyderabadcity.in/
http://blog.packersmovershyderabadcity.in/

4/4/2017
 · 
by
   
surbhi sharma

An excellent information provided thanks for all the information
visit here :
http://packersmoversbangalore.in/packers-and-movers-bangalore-to-hyderabad

4/4/2017
 · 
by
   
Packers And Movers Bangalore

This research is practically done by you and gives good ideas. visit here some useful content here.
http://packers-movers-bangalore.in/
http://blog.packers-movers-bangalore.in/

5/2/2017
 · 
by
   
packers And Movers Bangalore

This research is practically done by you and gives good ideas. visit here some useful content here. i love this website. your site is good and your work is very good for social work.. keep work.
http://packersmoversbangalore.in/packers-and-movers-raipur
http://packersmoversbangalore.in/packers-and-movers-pune

5/2/2017
 · 
by
   
Packers And Movers Trichy

Thanks for sharing such a valuable information.Im very thankful to you that you had given me this opportunity to write on this blog.please visit our website I assure you that it will be very useful for our website.
http://packersmoverschennai.in/packers-and-movers-trichy

5/2/2017
 · 
by
  • :*
  • :*
  • :
 *

Top Posts