How do I change the company domain name in Android Studio after creating a project?

Please Share On:

Today, I am going to show you how can you change the company domain name in the android studio after creating a project. You have just created a new project and you don’t like a company domain name or you have copy existing project and refactor into anther project name and you want to change the domain name too. The process is pretty simple and cool.

Following the following step to change the company domain name. Look over the following image, I have “com.geetaregmi.usCitizenshipTest” as a package name where “geetaregmi” is a domain name. I want to replace it into another domain name.

Here are the steps to do:

Step 1:

Right click on the package name -> Refactor -> Move

Step 2:

A message will pop up and ask what kind of refactor we need to do? Choose the first one and click OK.

Step 3:

A new warning message will pop up as shown below. Simple click “Yes” without worrying.

Step 4:

A new dialog box will pop up where you remove the old domain name and replace by new one which you like.The old domain name looks like below.

Now, I changed “geetaregmi” into “elsebazaar”. The new domain looks like below.

Make sure the two checkbox “Search in comments and strings” and “Search for text occurrences” must checked. Click “Refactor”.

Step 5:

An another dialog box will appear to confirm for domain name change. Click “Yes”.

Step 6:

Now, all the old domain name has been searched to change. Now last step to do. At the bottom of your android project screen. Click “Do Refactor”, which will change all old domain name into your new domain name.

Step 7: That’s it. See the final result. The domain name “geetaregmi” is moved to “elsebazaar”.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright @2023. All Right Reserved.

Social media & sharing icons powered by UltimatelySocial