Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change the company domain name in android studio after creating the project?

Tags:

android

When I created android project in android studio, I found field Company Domain Name .I have created with some name first. Now I want to change that company domain name. Is it possible to change? Please help me to solve this issue !

like image 894
Vivek Avatar asked Oct 15 '15 05:10

Vivek


People also ask

Can I rename my Android Studio project?

First, open the project directory by right-clicking on the project name and click at show in explorer option. Step 2: Close the android studio, and go to the window explorer of the project directory and rename the root folder with a new name.

What is company domain in Android Studio?

The domain name is used by Android Studio to generate a package name. Your package name is just a unique identifier for your application in the Google Play Store. It can be anything you want as long as it is unique. Generally, we use reverse domain names like com. something. or org.

How do I change the name of an android app project?

Go to the app > manifests > AndroidManifest. xml file and change the android:label field in your application node in AndroidManifest.


1 Answers

You can able to change the domain using following steps. For your example you are trying to change the domain name com.example to com.example1. So your package name should look like com.example.application_name.

  1. Right click on the package name in the project explorer and then select Refactor -> Move.
  2. A new popup will ask you to what kind of refactor you need to do. In that select the first one Move package 'com.example.application_name' to another package. and then click ok.
  3. A new warning window will show that the package is in multiple places. Click yes on that warning.
  4. A new dialog will opened. In that, change the To package value to the new domain name com.example1 and then make sure the check box is enabled for Search in comments and String and Search for text occurrences and then click Refactor. Now a new dialog will open and ask a confirmation to create the new package. Click Yes.
  5. In the bottom window it ll search all the named com.example and ask you to refactor. Click Do Refactor in that. That's it. you renamed the domain name from com.example to com.example1. The previous package will not be deleted. if you don't want that means you can delete it.
like image 124
Mahendran Sakkarai Avatar answered Nov 15 '22 18:11

Mahendran Sakkarai